impl

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidToken = errors.New("invalid token")

Functions

This section is empty.

Types

type AnyToken

type AnyToken struct{}

func (*AnyToken) HandleHeaderAuth

func (ns *AnyToken) HandleHeaderAuth(ctx context.Context, _ string, _ api.HeaderAuth) (context.Context, error)

func (*AnyToken) HandleQueryAuth

func (ns *AnyToken) HandleQueryAuth(ctx context.Context, _ string, _ api.QueryAuth) (context.Context, error)

type Server

type Server struct {
	Storage  storage.Storage
	Renderer *render.Renderer
	BaseURL  string
}

func (*Server) CreateNote

func (srv *Server) CreateNote(ctx context.Context, req *api.DraftMultipart) (*api.Note, error)

func (*Server) DeleteNote

func (srv *Server) DeleteNote(ctx context.Context, params api.DeleteNoteParams) error

func (*Server) UpdateNote

func (srv *Server) UpdateNote(ctx context.Context, req *api.DraftMultipart, params api.UpdateNoteParams) error

type StaticToken

type StaticToken struct {
	Token string
}

func (*StaticToken) HandleHeaderAuth

func (st *StaticToken) HandleHeaderAuth(ctx context.Context, _ string, t api.HeaderAuth) (context.Context, error)

func (*StaticToken) HandleQueryAuth

func (st *StaticToken) HandleQueryAuth(ctx context.Context, _ string, t api.QueryAuth) (context.Context, error)

Jump to

Keyboard shortcuts

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