Documentation ¶
Index ¶
- Constants
- type ClientToken
- type ClientTokens
- type DBClient
- func (dbClient *DBClient) Create(ctx context.Context, req *pb.ClientTokenCreateRequest) (*pb.ClientToken, error)
- func (dbClient *DBClient) Delete(ctx context.Context, req *pb.ClientTokenDeleteRequest) (*commonpb.VoidResponse, error)
- func (dbClient *DBClient) Get(ctx context.Context, req *pb.ClientTokenGetRequest) (*pb.ClientToken, error)
- func (dbClient *DBClient) Paging(ctx context.Context, req *pb.ClientTokenPagingRequest) (*pb.ClientTokenPagingResponse, error)
- func (dbClient *DBClient) Update(ctx context.Context, req *pb.ClientTokenUpdateRequest) (*pb.ClientToken, error)
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 ¶
func (*DBClient) Create ¶
func (dbClient *DBClient) Create(ctx context.Context, req *pb.ClientTokenCreateRequest) (*pb.ClientToken, error)
func (*DBClient) Delete ¶
func (dbClient *DBClient) Delete(ctx context.Context, req *pb.ClientTokenDeleteRequest) (*commonpb.VoidResponse, error)
func (*DBClient) Get ¶
func (dbClient *DBClient) Get(ctx context.Context, req *pb.ClientTokenGetRequest) (*pb.ClientToken, error)
func (*DBClient) Paging ¶
func (dbClient *DBClient) Paging(ctx context.Context, req *pb.ClientTokenPagingRequest) (*pb.ClientTokenPagingResponse, error)
func (*DBClient) Update ¶
func (dbClient *DBClient) Update(ctx context.Context, req *pb.ClientTokenUpdateRequest) (*pb.ClientToken, error)
Click to show internal directories.
Click to hide internal directories.