client_token

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenPrefix = "t_"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientToken

type ClientToken struct {
	common.BaseModel
	ClientID  string            `gorm:"column:client_id;type:char(36)" json:"clientID" yaml:"clientID"`
	UserID    string            `gorm:"column:user_id;type:varchar(191)" json:"userID" yaml:"userID"`
	Token     string            `gorm:"column:token;type:char(34)" json:"token" yaml:"token"`
	ExpiredAt time.Time         `gorm:"column:expired_at;type:datetime" json:"expiredAt" yaml:"expiredAt"`
	Metadata  metadata.Metadata `gorm:"column:metadata;type:json" json:"metadata" yaml:"metadata"`
}

func (*ClientToken) TableName

func (*ClientToken) TableName() string

func (*ClientToken) ToProtobuf

func (c *ClientToken) ToProtobuf() *pb.ClientToken

type ClientTokens

type ClientTokens []*ClientToken

func (ClientTokens) ToProtobuf

func (tokens ClientTokens) ToProtobuf() []*pb.ClientToken

type DBClient

type DBClient struct {
	DB *gorm.DB
}

func (*DBClient) Create

func (dbClient *DBClient) Create(ctx context.Context, req *pb.ClientTokenCreateRequest) (*pb.ClientToken, error)

func (*DBClient) Delete

func (*DBClient) Get

func (dbClient *DBClient) Get(ctx context.Context, req *pb.ClientTokenGetRequest) (*pb.ClientToken, error)

func (*DBClient) Paging

func (*DBClient) Update

func (dbClient *DBClient) Update(ctx context.Context, req *pb.ClientTokenUpdateRequest) (*pb.ClientToken, error)

Jump to

Keyboard shortcuts

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