session

package module
v0.0.0-...-3670298 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Routes map[myrouter.RouteKey]func(w http.ResponseWriter, r *http.Request, ps common.QueryMap) = map[myrouter.RouteKey]func(w http.ResponseWriter, r *http.Request, ps common.QueryMap){
	{Path: "/api/v1/login", Method: "POST", NeedAuth: true}: c.post,
}

Functions

This section is empty.

Types

type PostResponse

type PostResponse struct {
	*myhttp.ResponseBase
	*SessionData
}

func NewPostResponse

func NewPostResponse(res *myhttp.ResponseBase, sessionData *SessionData) *PostResponse

type SessionData

type SessionData struct {
	GivenName  string `json:"given_name"`
	FamilyName string `json:"family_name"`
	Email      string `json:"email"`
}

type SessionRepository

type SessionRepository struct {
}

func (*SessionRepository) Find

func (r *SessionRepository) Find(ctx context.Context, identifier string, password string) (*SessionData, error)

type SessionRequest

type SessionRequest struct {
	Identifier string `json:"identifier"`
	Secret     string `json:"secret"`
}

func NewSessionRequest

func NewSessionRequest(
	identifier string,
	secret string,
) SessionRequest

type SessionService

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

func (*SessionService) Login

func (s *SessionService) Login(ctx context.Context, identifier string, secret string) (*SessionData, error)

Jump to

Keyboard shortcuts

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