models

package
v0.0.0-...-326830c Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: GPL-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 Claims

type Claims struct {
	UserName string `json:"username"`
	UserID   uint   `json:"user_id"`
	jwt.RegisteredClaims
}

type ContentReqDTO

type ContentReqDTO struct {
	Choice string `json:"choice"`
	Token  string `json:"token"`
}

type ECDHKeyExchangeOutput

type ECDHKeyExchangeOutput struct {
	PubKeyServerX *big.Int `json:"pub_key_server_x"`
	PubKeyServerY *big.Int `json:"pub_key_server_y"`
}

type ECDHReqDTO

type ECDHReqDTO struct {
	Token       string   `json:"token"`
	PubKeyWasmX *big.Int `json:"pub_key_wasm_x"`
	PubKeyWasmY *big.Int `json:"pub_key_wasm_y"`
}

type LoginPrecheckDTO

type LoginPrecheckDTO struct {
	Username string `json:"username"`
}

type LoginPrecheckResponseDTO

type LoginPrecheckResponseDTO struct {
	Username string `json:"username"`
	Salt     string `json:"salt"`
}

type LoginUserDTO

type LoginUserDTO struct {
	Username             string `json:"username"`
	SaltedHashedPassword string `json:"password"`
	PubKey               string `json:"public_key"`
}

type LoginUserResponseDTO

type LoginUserResponseDTO struct {
	Token string `json:"token"`
}

type RegisterUserDTO

type RegisterUserDTO struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Salt     string `json:"salt"`
}

type User

type User struct {
	ID        uint   `gorm:"primaryKey; unique; autoIncrement; not null" json:"id"`
	Username  string `gorm:"unique; not null" json:"username"`
	Password  string `gorm:"not null" json:"password"`
	Salt      string `gorm:"not null" json:"salt"`
	PublicKey string `gorm:"not null" json:"public_key"`
}

func (User) TableName

func (User) TableName() string

Jump to

Keyboard shortcuts

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