model

package
v0.0.0-...-b053cec Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllRole = []Role{
	RoleAdmin,
	RoleUser,
}

Functions

This section is empty.

Types

type BooksFilter

type BooksFilter struct {
	Search *string `json:"search,omitempty"`
}

type Jwt

type Jwt struct {
	Access  string `json:"access"`
	Refresh string `json:"refresh"`
	Roles   []Role `json:"roles"`
}

type LoginInput

type LoginInput struct {
	RequestID uint   `json:"requestID"`
	Code      string `json:"code"`
}

type LoginRequestInput

type LoginRequestInput struct {
	Email string `json:"email"`
}

type NewBookInput

type NewBookInput struct {
	Magnet string `json:"magnet"`
}

type ProgressInput

type ProgressInput struct {
	BookID   uint    `json:"bookID"`
	Part     uint    `json:"part"`
	Speed    float64 `json:"speed"`
	Position float64 `json:"position"`
}

type Role

type Role string
const (
	RoleAdmin Role = "ADMIN"
	RoleUser  Role = "USER"
)

func (Role) IsValid

func (e Role) IsValid() bool

func (Role) MarshalGQL

func (e Role) MarshalGQL(w io.Writer)

func (Role) String

func (e Role) String() string

func (*Role) UnmarshalGQL

func (e *Role) UnmarshalGQL(v interface{}) error

Jump to

Keyboard shortcuts

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