Commit Graph

3 Commits

Author SHA1 Message Date
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 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 8e9321928b Added a repository for API source of truth
This commit adds a new package repository containing every single cchat
types that the package provides. Its goal is to be the source of truth
for the cchat files to be generated from.

A huge advantage of this is having types in an easily representable
format. This means that other languages can easily parse the repository
and generate its own types that are similar to the original ones.

Having a repository also allows easier code generation. For example,
this commit will allow generating the "empty" package in the future,
which would contain empty implementations of cchat databases that would
return nil for asserter methods.
2020-09-26 18:24:56 -07:00