common

package
v0.0.0-...-1070708 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusSuccess = 0
	StatusFailure = 1
)
View Source
const (
	ExtractedJwtPayloadName = "Jwt-Payload"
	JwtPayloadUserIdName    = "uid"
)
View Source
const (
	S3CoverBucketName            = "t4k-cover"
	S3VideoBucketName            = "t4k-video"
	ObjectServiceCoverPathPrefix = "/s3/cover/"
	ObjectServiceVideoPathPrefix = "/s3/video/"
	ObjectServiceFilenameParam   = "filename"
)
View Source
const (
	MqCoverQueueName = "cover"
)

Variables

View Source
var (
	ErrInternal          = errors.New("internal error")
	ErrUserAlreadyExist  = errors.New("user already exist")
	ErrUserNotExist      = errors.New("user not exist")
	ErrPasswordIncorrect = errors.New("password incorrect")
	ErrSignJwt           = errors.New("cannot sign jwt")
	ErrVerifyJwt         = errors.New("failed to verify jwt")
)

Functions

func ExtractSignInUserId

func ExtractSignInUserId(c *gin.Context) (uint64, error)

Types

type DefaultValidator

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

func (*DefaultValidator) Engine

func (v *DefaultValidator) Engine() interface{}

func (*DefaultValidator) ValidateStruct

func (v *DefaultValidator) ValidateStruct(obj interface{}) error

Jump to

Keyboard shortcuts

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