user

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(orm *gorm.DB) *Database

func (*Database) Create

func (db *Database) Create(ctx context.Context, user *User) (error error)

func (*Database) Delete

func (db *Database) Delete(ctx context.Context, user *User) (error error)

func (*Database) Get

func (db *Database) Get(ctx context.Context, user *User) (error error)

type User

type User struct {
	ID               string     `json:"id" gorm:"unique_index"`
	ClientPublicKey  string     `json:"clientPublicKey,omitempty" gorm:"size:2000"`
	ServerPublicKey  string     `json:"serverPublicKey" gorm:"-"`
	ServerPrivateKey string     `json:"-" gorm:"size:2000"`
	CreatedAt        time.Time  `json:"-"` // gorm specical field
	DeleteAt         *time.Time `json:"-"` // gorm specical field
}

Jump to

Keyboard shortcuts

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