api

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BSkyTokenValidator added in v0.0.15

func BSkyTokenValidator(pdsHost string) func(ctx context.Context, token string) (did string, err error)

func New

func New(
	log *zap.Logger,
	hostname string,
	listenAddr string,
	feedRegistry *feed.Service,
	pgxStore *store.PGXStore,
	bskyCredentials *bluesky.Credentials,
	authEngine *AuthEngine,
) (*http.Server, error)

Types

type AuthEngine added in v0.0.13

type AuthEngine struct {
	// ActorGetter provides a way for the AuthEngine to fetch the Actor data
	// associated with a given DID.
	ActorGetter actorGetter
	// TokenValidator validates a given token and returns the DID associated
	// with that token.
	TokenValidator func(ctx context.Context, token string) (did string, err error)
	Log            *zap.Logger
}

AuthEngine helps authenticate requests made by users and apply authorization rules based on the identity found during authentication.

type ModerationServiceHandler added in v0.0.2

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

func (*ModerationServiceHandler) BanActor added in v0.0.13

func (*ModerationServiceHandler) CreateActor added in v0.0.13

func (*ModerationServiceHandler) CreateCommentAuditEvent added in v0.0.11

func (*ModerationServiceHandler) ForceApproveActor added in v0.0.14

func (*ModerationServiceHandler) GetActor added in v0.0.4

func (*ModerationServiceHandler) ListActors added in v0.0.4

func (*ModerationServiceHandler) ListAuditEvents added in v0.0.11

func (*ModerationServiceHandler) Ping added in v0.0.2

func (*ModerationServiceHandler) ProcessApprovalQueue added in v0.0.2

func (*ModerationServiceHandler) UnapproveActor added in v0.0.13

type PublicServiceHandler added in v0.0.23

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

func (*PublicServiceHandler) ListFeeds added in v0.0.23

Jump to

Keyboard shortcuts

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