models

package
v0.0.0-...-a66885a Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiResponse

type ApiResponse struct {
	Code    int         `json:"code,omitempty"`
	Message string      `json:"message,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

func (*ApiResponse) Error

func (r *ApiResponse) Error(code int, message string)

func (*ApiResponse) Set

func (r *ApiResponse) Set(code int, message string, data interface{})

type Board

type Board struct {
	Id                 int         `json:"id,omitempty"`
	ProjectId          int         `json:"projectId"`
	OwnerId            int         `json:"ownerId,omitempty"`
	DefaultPermissions *Permission `json:"defaultPermissions,omitempty"`
	Datetimes          *Datetimes  `json:"datetimes,omitempty"`
	Title              string      `json:"title"`
}

type Content

type Content struct {
	ContentType int32  `json:"content_type"`
	Data        string `json:"data"`
}

type Datetimes

type Datetimes struct {
	Created  int64 `json:"created,omitempty"`
	Updated  int64 `json:"updated,omitempty"`
	Accessed int64 `json:"accessed,omitempty"`
}

type Label

type Label struct {
	Id      string `json:"id,omitempty"`
	BoardId int    `json:"boardId"`
	Name    string `json:"name"`
	Color   uint32 `json:"color"`
}

type Member

type Member struct {
	Id          int         `json:"id"`
	Nickname    string      `json:"nickname" valid:"length(3|32)"`
	Avatar      string      `json:"avatar"`
	IsOwner     bool        `json:"isOwner"`
	Permissions *Permission `json:"permissions"`
}

type Permission

type Permission struct {
	Read  bool `json:"read,omitempty" valid:"type(bool)"`
	Write bool `json:"write,omitempty" valid:"type(bool)"`
	Admin bool `json:"admin,omitempty" valid:"type(bool)"`
}

type Project

type Project struct {
	Id                 int         `json:"id,omitempty"`
	OwnerId            int         `json:"ownerId,omitempty"`
	DefaultPermissions *Permission `json:"defaultPermissions,omitempty"`
	Datetimes          *Datetimes  `json:"datetimes,omitempty"`
	Title              string      `json:"title" valid:"length(1|50)"`
	Description        string      `json:"description,omitempty"`
}

type Task

type Task struct {
	Id          int        `json:"_id,omitempty"`
	ListId      int        `json:"listId"`
	Title       string     `json:"title"`
	Description string     `json:"description,omitempty"`
	Datetimes   *Datetimes `json:"datetimes,omitempty"`
	Position    int        `json:"position" valid:"type(int)"`
}

type TaskList

type TaskList struct {
	Id       int    `json:"id,omitempty"`
	BoardId  int    `json:"boardId" db:"board_id"`
	Title    string `json:"title"`
	Position int    `json:"position" valid:"type(int)"`
}

type UpdateBoard

type UpdateBoard struct {
	DefaultPermissions *UpdatePermission `json:"defaultPermissions,omitempty"`
	Datetimes          *UpdateDatetimes  `json:"datetimes,omitempty"`
	Title              *string           `json:"title"`
}

type UpdateDatetimes

type UpdateDatetimes struct {
	Created  *int64 `json:"created,omitempty"`
	Updated  *int64 `json:"updated,omitempty"`
	Accessed *int64 `json:"accessed,omitempty"`
}

type UpdateLabel

type UpdateLabel struct {
	Name  *string `json:"name"`
	Color *uint32 `json:"color"`
}

type UpdatePermission

type UpdatePermission struct {
	Read  *bool `json:"read,omitempty" valid:"type(*bool)"`
	Write *bool `json:"write,omitempty" valid:"type(*bool)"`
	Admin *bool `json:"admin,omitempty" valid:"type(*bool)"`
}

type UpdateProject

type UpdateProject struct {
	DefaultPermissions *UpdatePermission `json:"defaultPermissions,omitempty"`
	Datetimes          *UpdateDatetimes  `json:"datetimes,omitempty"`
	Title              *string           `json:"title" valid:"length(1|50)"`
	Description        *string           `json:"description,omitempty"`
}

type UpdateTask

type UpdateTask struct {
	ListId      *int             `json:"listId" valid:"type(*int)"`
	Title       *string          `json:"title"`
	Description *string          `json:"description,omitempty"`
	Datetimes   *UpdateDatetimes `json:"datetimes,omitempty"`
	Position    *int             `json:"position" valid:"type(*int)"`
}

type UpdateTaskList

type UpdateTaskList struct {
	Title    *string `json:"title"`
	Position *int    `json:"position" valid:"type(*int)"`
}

type UpdateUser

type UpdateUser struct {
	Nickname  *string `json:"nickname" valid:"length(3|32)"`
	Firstname *string `json:"firstname" valid:"length(1|32)"`
	Lastname  *string `json:"lastname" valid:"length(1|32)"`
	Email     *string `json:"email" valid:"email"`
	Phone     *string `json:"phone" valid:"numeric"`
	Avatar    *string `json:"avatar"`
}

type UrlIds

type UrlIds struct {
	ProjectId int
	BoardId   int
	ListId    int
	TaskId    int
}

type User

type User struct {
	Id        int    `json:"id,omitempty"`
	Nickname  string `json:"nickname" valid:"length(3|32)"`
	Firstname string `json:"firstname" valid:"length(1|32)"`
	Lastname  string `json:"lastname" valid:"length(1|32)"`
	Email     string `json:"email" valid:"email"`
	Phone     string `json:"phone" valid:"numeric"`
	Password  string `json:"password" valid:"length(6|32)"`
	Avatar    string `json:"avatar"`
}

Jump to

Keyboard shortcuts

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