handler

package
v0.0.0-...-46fdcb5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const HeaderApiKey = "Api-Key"

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

func NewAuth

func NewAuth(
	signIn port.APIAuthSignIn,
	signOut port.APIAuthSignOut,
	signUp port.APIAuthSignUp,
	verify port.APIAuthVerify,
	refresh port.APIAuthRefresh,
	code port.APIAuthGenerateCode,
) *Auth

type ClientFactory

type ClientFactory interface {
	Of(string) (*Client, error)
}

type Handler

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

func New

func New(
	version string,
	key string,
	auth *Auth,
	client *Client,
	public *public.Public,
) *Handler

func (*Handler) IsUnauthorizedAPIKey

func (hdl *Handler) IsUnauthorizedAPIKey(w http.ResponseWriter, r *http.Request) bool

func (*Handler) V1APIVersion

func (hdl *Handler) V1APIVersion(w http.ResponseWriter, r *http.Request)

func (*Handler) V1AuthRefresh

func (hdl *Handler) V1AuthRefresh(w http.ResponseWriter, r *http.Request, params openapi.V1AuthRefreshParams)

GET /v1/auth/refresh.

func (*Handler) V1AuthResign

func (hdl *Handler) V1AuthResign(w http.ResponseWriter, r *http.Request)

DELETE /v1/auth.

func (*Handler) V1AuthSignIn

func (hdl *Handler) V1AuthSignIn(w http.ResponseWriter, r *http.Request)

POST /v1/auth/signin.

func (*Handler) V1AuthSignOut

func (hdl *Handler) V1AuthSignOut(w http.ResponseWriter, r *http.Request)

GET /v1/auth/signout.

func (*Handler) V1AuthSignUp

func (hdl *Handler) V1AuthSignUp(w http.ResponseWriter, r *http.Request)

POST /v1/auth/signup.

func (*Handler) V1AuthVerify

func (hdl *Handler) V1AuthVerify(w http.ResponseWriter, r *http.Request)

GET /v1/auth/verify.

func (*Handler) V1CoreVersion

func (hdl *Handler) V1CoreVersion(w http.ResponseWriter, r *http.Request)

func (*Handler) V1Health

func (hdl *Handler) V1Health(w http.ResponseWriter, r *http.Request)

func (*Handler) V1ListArticles

func (hdl *Handler) V1ListArticles(w http.ResponseWriter, r *http.Request, params openapi.V1ListArticlesParams)

func (*Handler) V1Sign

func (hdl *Handler) V1Sign(w http.ResponseWriter, r *http.Request, params openapi.V1SignParams)

(GET /v1/sign).

Jump to

Keyboard shortcuts

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