model

package
v0.14.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSN

type DSN struct {
	Driver   string `json:"driver"`
	Username string `json:"username"`
	Password string `json:"password"`
	Hostname string `json:"hostname"`
	Port     int    `json:"port"`
	Name     string `json:"name"`
}

DSN struct

func (*DSN) ConvertToJSON

func (d *DSN) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*DSN) LoadFromJSON

func (d *DSN) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

func (*DSN) ToString

func (d *DSN) ToString() string

ToString gets the dsn string

type Role

type Role struct {
	ID        int       `json:"id"`
	Name      string    `json:"name"`
	Value     string    `json:"value"`
	StartAt   time.Time `json:"startAt"`
	EndAt     time.Time `json:"endAt"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Role struct

func (*Role) ConvertToJSON

func (o *Role) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Role) LoadFromJSON

func (o *Role) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type RoleRequest

type RoleRequest struct {
	ID        int               `json:"id"`
	Name      string            `json:"name"`
	Value     map[string]string `json:"value"`
	StartAt   time.Time         `json:"startAt"`
	EndAt     time.Time         `json:"endAt"`
	CreatedAt time.Time         `json:"createdAt"`
	UpdatedAt time.Time         `json:"updatedAt"`
}

RoleRequest struct

func (*RoleRequest) ConvertToJSON

func (o *RoleRequest) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*RoleRequest) LoadFromJSON

func (o *RoleRequest) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Roles

type Roles struct {
	Roles []Role `json:"roles"`
}

Roles struct

func (*Roles) ConvertToJSON

func (o *Roles) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Roles) LoadFromJSON

func (o *Roles) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

Jump to

Keyboard shortcuts

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