db

package
v0.0.0-...-a1d8bd3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SqlTableSizes string

Functions

func CreateSecret

func CreateSecret() ([]model.Secret, error)

func CreateTokenForUser

func CreateTokenForUser(account *model.User) (*auth.JwtToken, error)

func CreateUser

func CreateUser(user model.User) (*model.User, error)

func GetClaims

func GetClaims(token jwt.Token) (jwt.MapClaims, error)

func GetSecret

func GetSecret(id string) (*model.Secret, error)

func GetSecrets

func GetSecrets() ([]model.Secret, error)

func GetUser

func GetUser(username string) (*model.User, error)

func GetUserById

func GetUserById(id string) (*model.User, error)

func SelectTableSizes

func SelectTableSizes() ([]model.TableSize, error)

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessToken string        `json:"access_token"`
	TokenType   string        `json:"token_type"`
	ExpiresIn   time.Duration `json:"expires_in"`
	ExpiresAt   int64         `json:"expires_at"`
	Scope       string        `json:"scope"`
}

type CustomClaims

type CustomClaims struct {
	*jwt.RegisteredClaims
	Scope string `json:"scope"`
}

Jump to

Keyboard shortcuts

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