shv1

package
v0.0.0-...-3d786a4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizationHeader = "authorization"
	AuthorizationBearer = "bearer"
)

Variables

This section is empty.

Functions

func ApiError

func ApiError(Msg string, Err error) error

func AuthorizeUser

func AuthorizeUser(ctx context.Context, tokenMaker token.Maker, accessibleRoles []string) (*token.Payload, error)

func ConvertActor

func ConvertActor(v db.Actor) *nfpbv1.ActorResponse

func ConvertActors

func ConvertActors(v []db.Actor) []*nfpbv1.ActorResponse

func ConvertGenre

func ConvertGenre(v db.Genre) *nfpbv1.Genre

func ConvertGenres

func ConvertGenres(v []db.Genre) []*nfpbv1.Genre

func ConvertLanguage

func ConvertLanguage(v db.Language) *nfpbv1.LanguageResponse

func ConvertMeta

func ConvertMeta(v db.Meta) *nfpbv1.MetaResponse

func ConvertStudio

func ConvertStudio(v db.Studio) *nfpbv1.Studio

func ConvertStudios

func ConvertStudios(v []db.Studio) []*nfpbv1.Studio

func FieldViolation

func FieldViolation(field string, err error) *errdetails.BadRequest_FieldViolation

func InvalidArgumentError

func InvalidArgumentError(violations []*errdetails.BadRequest_FieldViolation) error

func UnAuthenticatedError

func UnAuthenticatedError(err error) error

Types

type Metadata

type Metadata struct {
	UserAgent string
	ClientIP  string
}

func ExtractMetadata

func ExtractMetadata(ctx context.Context) *Metadata

Jump to

Keyboard shortcuts

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