token

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	X_LIMIT = 1000
)

Variables

This section is empty.

Functions

func NewCreateTokenParams

func NewCreateTokenParams(tokenDto *dto.TokenDto) db.CreateTokenParams

Types

type TokenResolver

type TokenResolver struct {
	Repository                 token.TokenRepository
	OcpiService                *transportation.OcpiService
	TokenAuthorizationResolver *tokenauthorization.TokenAuthorizationResolver
	VersionDetailResolver      *versiondetail.VersionDetailResolver
}

func NewResolver

func NewResolver(repositoryService *db.RepositoryService, services *service.ServiceResolver) *TokenResolver

func (*TokenResolver) AuthorizeToken

func (r *TokenResolver) AuthorizeToken(rw http.ResponseWriter, request *http.Request)

func (*TokenResolver) CreateTokenDto

func (r *TokenResolver) CreateTokenDto(ctx context.Context, token db.Token) *dto.TokenDto

func (*TokenResolver) CreateTokenListDto

func (r *TokenResolver) CreateTokenListDto(ctx context.Context, tokens []db.Token) []render.Renderer

func (*TokenResolver) GenerateAuthID

func (r *TokenResolver) GenerateAuthID(ctx context.Context) (string, error)

func (*TokenResolver) GenerateUid added in v0.4.2

func (r *TokenResolver) GenerateUid(ctx context.Context) (string, error)

func (*TokenResolver) ListTokens

func (r *TokenResolver) ListTokens(rw http.ResponseWriter, request *http.Request)

func (*TokenResolver) PushToken

func (r *TokenResolver) PushToken(ctx context.Context, httpMethod string, uid string, tokenDto *dto.TokenDto)

func (*TokenResolver) ReplaceToken

func (r *TokenResolver) ReplaceToken(ctx context.Context, userId int64, tokenAllowed db.TokenAllowedType, uid string, tokenDto *dto.TokenDto) *db.Token

func (*TokenResolver) TokenContext

func (r *TokenResolver) TokenContext(next http.Handler) http.Handler

func (*TokenResolver) UnmarshalDto

func (r *TokenResolver) UnmarshalDto(body io.ReadCloser) (*dto.TokenDto, error)

func (*TokenResolver) UnmarshalPullDto

func (r *TokenResolver) UnmarshalPullDto(body io.ReadCloser) (*transportation.OcpiResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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