model

package
v0.0.0-...-efa6b18 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type NewRefreshToken

type NewRefreshToken struct {
	TokenName *string `json:"tokenName,omitempty"`
}

type NewRole

type NewRole struct {
	RoleName      string `json:"roleName"`
	IsAdmin       bool   `json:"isAdmin"`
	IsUserCreator bool   `json:"isUserCreator"`
}

type NewTodo

type NewTodo struct {
	Text   string `json:"text"`
	UserID string `json:"userId"`
}

type NewUser

type NewUser struct {
	UserName string  `json:"userName"`
	FullName *string `json:"fullName,omitempty"`
	Password string  `json:"password"`
}

type Privilege

type Privilege string
const (
	PrivilegeIsAdmin       Privilege = "isAdmin"
	PrivilegeIsUserCreator Privilege = "isUserCreator"
)

func (Privilege) IsValid

func (e Privilege) IsValid() bool

func (Privilege) MarshalGQL

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

func (Privilege) String

func (e Privilege) String() string

func (*Privilege) UnmarshalGQL

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

type RefreshToken

type RefreshToken struct {
	ID         string  `json:"id"`
	ExpiryDate int     `json:"expiryDate"`
	TokenName  *string `json:"tokenName,omitempty"`
	Selector   *string `json:"selector,omitempty"`
	Token      *string `json:"token,omitempty"`
	UserID     string  `json:"userId"`
}

type RelationRoleUser

type RelationRoleUser struct {
	User              *User `json:"user"`
	UserIsRoleManager bool  `json:"userIsRoleManager"`
}

type RelationUserRole

type RelationUserRole struct {
	Role              *Role `json:"role"`
	UserIsRoleManager bool  `json:"userIsRoleManager"`
}

type Role

type Role struct {
	ID            string              `json:"id"`
	RoleName      string              `json:"roleName"`
	IsAdmin       bool                `json:"isAdmin"`
	IsUserCreator bool                `json:"isUserCreator"`
	RoleMembers   []*RelationRoleUser `json:"roleMembers"`
}

type Todo

type Todo struct {
	ID   string `json:"id"`
	Text string `json:"text"`
	Done bool   `json:"done"`
	User *User  `json:"user"`
}

type UpdateRefreshToken

type UpdateRefreshToken struct {
	TokenName *string `json:"tokenName,omitempty"`
}

type UpdateRole

type UpdateRole struct {
	RoleName      *string `json:"roleName,omitempty"`
	IsAdmin       *bool   `json:"isAdmin,omitempty"`
	IsUserCreator *bool   `json:"isUserCreator,omitempty"`
}

type UpdateTodo

type UpdateTodo struct {
	Text *string `json:"text,omitempty"`
	Done *bool   `json:"done,omitempty"`
}

type UpdateUser

type UpdateUser struct {
	UserName *string `json:"userName,omitempty"`
	FullName *string `json:"fullName,omitempty"`
	Password *string `json:"password,omitempty"`
}

type User

type User struct {
	ID       string              `json:"id"`
	UserName string              `json:"userName"`
	FullName *string             `json:"fullName,omitempty"`
	Todos    []*Todo             `json:"todos"`
	Roles    []*RelationUserRole `json:"roles"`
}

Jump to

Keyboard shortcuts

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