model

package
v0.0.0-...-a26e058 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	KeySecret string `gorm:"type:text;description:KeySecret; comment: uid的rsa私钥"    json:"key_secret"`
	KeyCID    string `gorm:"type:varchar(256);;description:KeyCID; comment: key对应的ipfs CID"    json:"key_cid"`
	KeyUuid   string `gorm:"index;type:varchar(256);description:KeyUuid; comment: 用户ID"    json:"key_uuid"`
	*gorm.Model
}

type Repo

type Repo struct {
	DB *gorm.DB
}

func NewRepo

func NewRepo(db *gorm.DB) *Repo

func (*Repo) GetByUID

func (r *Repo) GetByUID(ctx context.Context, uid string) (*Secret, error)

type Secret

type Secret struct {
	*gorm.Model
	KeyUuid string `gorm:"type:varchar(256);description:KeyUuid;comment:用户ID"          json:"key_uuid"`
	RsaPriv string `gorm:"type:text;description:RsaPriv;comment:RSA私钥"         json:"rsa_priv"`
	RsaPub  string `gorm:"type:text;description:RsaPub;comment:RSA公钥"          json:"rsa_pub"`
}

Jump to

Keyboard shortcuts

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