client

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.BaseModel
	Name        string            `gorm:"column:name;type:varchar(191)" json:"name" yaml:"name"`
	Desc        string            `gorm:"column:desc;type:varchar(1024)" json:"desc" yaml:"desc"`
	AccessKeyID string            `gorm:"column:access_key_id;type:char(32)" json:"accessKeyID" yaml:"accessKeyID"`
	SecretKeyID string            `gorm:"column:secret_key_id;type:char(32)" json:"secretKeyID" yaml:"secretKeyID"`
	Metadata    metadata.Metadata `gorm:"column:metadata;type:mediumtext" json:"metadata" yaml:"metadata"`
}

func (*Client) TableName

func (*Client) TableName() string

func (*Client) ToProtobuf

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

type Clients

type Clients []*Client

func (Clients) ToProtobuf

func (clients Clients) ToProtobuf() []*pb.Client

type DBClient

type DBClient struct {
	DB *gorm.DB
}

func (*DBClient) Create

func (dbClient *DBClient) Create(ctx context.Context, req *pb.ClientCreateRequest) (*pb.Client, error)

func (*DBClient) Delete

func (dbClient *DBClient) Delete(ctx context.Context, req *pb.ClientDeleteRequest) (*commonpb.VoidResponse, error)

func (*DBClient) Get

func (dbClient *DBClient) Get(ctx context.Context, req *pb.ClientGetRequest) (*pb.Client, error)

func (*DBClient) Paging

func (dbClient *DBClient) Paging(ctx context.Context, req *pb.ClientPagingRequest) (*pb.ClientPagingResponse, error)

func (*DBClient) Update

func (dbClient *DBClient) Update(ctx context.Context, req *pb.ClientUpdateRequest) (*pb.Client, error)

Jump to

Keyboard shortcuts

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