models

package
v0.0.0-...-52789aa Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BearerToken

type BearerToken struct {
	AccessToken  string `json:"token,omitempty"`
	Type         string `json:"tokenType"`
	RefreshToken string `json:"refreshToken,omitempty"`
}

BearerToken is the struct which is exposed by the /auth endpoint

type Error

type Error struct {
	Err string `json:"err"`
}

Error describe error serialization.

type TaskAns

type TaskAns struct {
	models.Task
	RunAt   int64 `json:"runAt"`
	RunCode int64 `json:"runCode"`
}

TaskAns hold Task attributes and state fields.

type TasksAns

type TasksAns []TaskAns

TasksAns is an array of TaskAns.

type Token

type Token struct {
	Token     string    `db:"token"`
	UserID    string    `db:"user_id"`
	Roles     []string  `db:"roles"`
	Type      string    `db:"type"`
	CreatedAt time.Time `db:"created_at"`
}

Token describe token serialization.

type Tokens

type Tokens []Token

Tokens is a slice of Token

type User

type User struct {
	ID        string    `json:"id" sql:"user_id,pk"`
	Name      string    `json:"name"`
	Password  string    `json:"password,omitempty"`
	Roles     []string  `json:"roles,omitempty"`
	CreatedAt time.Time `json:"created_at"`
}

User holds user attributes.

type Users

type Users []User

Users defined an array of user.

Jump to

Keyboard shortcuts

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