v1

package
v0.0.0-...-a915469 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2022 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logic

type Logic struct {
	// contains filtered or unexported fields
}

func New

func New(db db.DB, fc *fc.Client) *Logic

New returns a new logic module.

func (*Logic) AddAgreedTerms

func (logic *Logic) AddAgreedTerms(ctx context.Context, account *models.Account, urls []string) error

func (*Logic) DeleteToken

func (logic *Logic) DeleteToken(ctx context.Context, token *models.Token) error

func (*Logic) GenerateSigningKey

func (logic *Logic) GenerateSigningKey() (ed25519.PrivateKey, error)

func (*Logic) GetPublicKey

func (logic *Logic) GetPublicKey() (string, error)

func (*Logic) GetTerms

func (logic *Logic) GetTerms(ctx context.Context) models.Terms

func (*Logic) IsEphemeralPubKeyValid

func (logic *Logic) IsEphemeralPubKeyValid(ctx context.Context, pubKey string) (bool, error)

func (*Logic) IsPubKeyValid

func (logic *Logic) IsPubKeyValid(ctx context.Context, pubKey string) (bool, error)

func (*Logic) IssueToken

func (logic *Logic) IssueToken(ctx context.Context, mxID string) (*models.Token, error)

func (*Logic) RequireAuth

func (logic *Logic) RequireAuth(r *http.Request) (*models.Token, gdhttp.ErrCode, string)

func (*Logic) Start

func (logic *Logic) Start(_ context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL