Documentation ¶
Index ¶
- Variables
- type Logic
- func (l *Logic) FediHelper(s fedihelper.SoftwareName) fedihelper.Helper
- func (l *Logic) GenInstanceFromDomain(ctx context.Context, domain string) (*models.Instance, error)
- func (l *Logic) GetInstanceForActor(ctx context.Context, actorID *url.URL) (*models.Instance, error)
- func (l *Logic) GetInstanceForServerHostname(ctx context.Context, serverHostname string) (*models.Instance, error)
- func (l *Logic) GetInstanceSelf(ctx context.Context) (*models.Instance, error)
- func (l *Logic) GetLoginURL(ctx context.Context, instance *models.Instance) (*url.URL, error)
- func (l *Logic) HandleOauthCallback(r *http.Request, instance *models.Instance) (*models.Account, int, error)
- func (l *Logic) ReadAccountByToken(ctx context.Context, t string) (*models.Account, error)
- func (l *Logic) ReadInstanceByToken(ctx context.Context, t string) (*models.Instance, error)
- func (l *Logic) ValidateRequest(r *http.Request, actorURI *url.URL) (bool, *fedihelper.Actor)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCantCast = errors.New("unable to cast interface to type") ErrTokenWrongKind = errors.New("token is wrong kind") )
Functions ¶
This section is empty.
Types ¶
type Logic ¶
type Logic struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, d db.DB, h *ihttp.Client, k kv.KV, tokz *token.Tokenizer) (*Logic, error)
New created a new logic module
func (*Logic) FediHelper ¶
func (l *Logic) FediHelper(s fedihelper.SoftwareName) fedihelper.Helper
FediHelper returns a helper for a given software package.
func (*Logic) GenInstanceFromDomain ¶
func (*Logic) GetInstanceForActor ¶
func (*Logic) GetInstanceForServerHostname ¶
func (*Logic) GetInstanceSelf ¶
func (*Logic) GetLoginURL ¶
func (*Logic) HandleOauthCallback ¶
func (*Logic) ReadAccountByToken ¶
func (*Logic) ReadInstanceByToken ¶
func (*Logic) ValidateRequest ¶
Click to show internal directories.
Click to hide internal directories.