api

package
v0.0.78 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 24 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(
	ctx context.Context,
	log *slog.Logger,
	hostname string,
	listenAddr string,
	feedService feedService,
	pgxStore *store.PGXStore,
	pdsHost string,
	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            *slog.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) AssignRoles added in v0.0.68

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) HoldBackPendingActor added in v0.0.38

func (*ModerationServiceHandler) ListActors added in v0.0.4

func (*ModerationServiceHandler) ListAuditEvents added in v0.0.11

func (*ModerationServiceHandler) ListRoles added in v0.0.45

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

type ServerGetSession_Output added in v0.0.53

type ServerGetSession_Output struct {
	Did            string  `json:"did" cborgen:"did"`
	Email          *string `json:"email,omitempty" cborgen:"email,omitempty"`
	EmailConfirmed *bool   `json:"emailConfirmed,omitempty" cborgen:"emailConfirmed,omitempty"`
	Handle         string  `json:"handle" cborgen:"handle"`
}

type UserServiceHandler added in v0.0.29

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

func (*UserServiceHandler) GetMe added in v0.0.29

func (*UserServiceHandler) JoinApprovalQueue added in v0.0.29

type WebDID added in v0.0.29

type WebDID struct {
	Context []string        `json:"@context"`
	ID      string          `json:"id"`
	Service []WebDIDService `json:"service"`
}

type WebDIDService added in v0.0.29

type WebDIDService struct {
	ID              string `json:"id"`
	Type            string `json:"type"`
	ServiceEndpoint string `json:"serviceEndpoint"`
}

Jump to

Keyboard shortcuts

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