Commit Graph

8 Commits

Author SHA1 Message Date
diamondburned b5bb0c9bb9 Revert "Replace stop callbacks with contexts"
This reverts commit 410ac73469.

The rationale is that the frontend can wrap its own components with a
disposable thread-safe wrapper that doesn't work once it's invalidated
if it wants the guarantee that the component doesn't work anymore once
the context is stopped.
2021-05-04 16:19:13 -07:00
diamondburned 410ac73469 Replace stop callbacks with contexts
This commit removes all stop callbacks in ContainerMethods. The
intention is to have backends disconnect callbacks when the context is
cancelled, rather than when the stop function is called.

This helps get rid of countless race condition flaws caused by the
duration between the context being cancelled on one thread and the stop
callback being set in another, causing the handlers to not disconnect.
2021-05-01 17:49:25 -07:00
diamondburned ee9c2cc37c Remove redundant function 2021-03-18 09:58:13 -07:00
diamondburned 41a7dac033 Added Columnator
This commit added the Columnator interface. This interface accommodates
the fact that some services (such as Discord) stylizes certain nested
servers in the same column.

This commit also fixed a minor test case.
2021-03-08 16:22:30 -08:00
diamondburned 06a26af5ba Slightly cleaner generation structure 2021-01-08 19:55:35 -08:00
diamondburned 955b99c9b6 Added AuthenticateError
This commit broke both the cchat API and its repository generation API
to accomodate for custom error types, as the new Authenticator API now
uses AuthenticateError over error to add in multi-stage authentication
instead of the old method with the for loop.

This commit also removed the multistage example documented in
Authenticator, as the API is now clearer.

This commit also added the WrapAuthenticateError helper function that
wraps a normal error into an AuthenticateError that does not have a
NextStage return. Backends should use this for
2020-10-27 13:33:52 -07:00
diamondburned 25980eb794 Added package empty
This package adds the code generation for package empty, which provides
structs that has no-op asserter methods for ease of use.

The package demonstrates one of the many possible use cases of having a
repository ready for code generation.
2020-10-03 14:31:38 -07:00
diamondburned 516532ee01 Repository changes; regenerated code
This commit fixes some trivial errors in the repository package. The
changes are breaking.

This commit also replaced the old cchat and text Go source code files
with ones generated straight from the repository. To regenerate, run

    go generate ./...

The code is generated using the Jennifer library. In the future, all
generated code (including package empty and the RPC library) will use
Jennifer.
2020-09-27 18:41:17 -07:00