models

package
Version: v0.0.0-...-fe9e027 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUser

type CreateUser struct {
	AccessToken string `db:"token"`
	Login       string `db:"login"`
	Password    string `db:"password"`
	Role        string `db:"user_role"`
}

type Permissions

type Permissions struct {
	CreateUser  bool `db:"create_user"`
	CreateRole  bool `db:"create_role"`
	CreateValue bool `db:"create_value"`
	DeleteUser  bool `db:"delete_user"`
	DeleteRole  bool `db:"delete_role"`
	DeleteValue bool `db:"delete_value"`
}

type Role

type Role struct {
	CreatedBy   string `db:"created_by"`
	CreateUser  bool   `db:"create_user"`
	CreateRole  bool   `db:"create_role"`
	CreateValue bool   `db:"create_value"`
	DeleteUser  bool   `db:"delete_user"`
	DeleteRole  bool   `db:"delete_role"`
	DeleteValue bool   `db:"delete_value"`
	Role        string `db:"user_role"`
}

type User

type User struct {
	Login    string `db:"login"`
	Password string `db:"password"`
}

type UserToken

type UserToken struct {
	AccessToken string    `json:"access_token"`
	Exp         time.Time `json:"exp"`
	Role        string    `json:"role"`
	Login       string    `json:"login"`
}

type Value

type Value struct {
	CreatedBy string `db:"created_by"`
	Key       string `db:"key"`
	Value     string `db:"value"`
	Roles     string `db:"roles"`
}

Jump to

Keyboard shortcuts

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