models

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: GPL-3.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthLogin

type AuthLogin struct {
	Email     string `bson:"email,omitempty"`
	AuthToken string `bson:"auth_token,omitempty"`
}

type Device

type Device struct {
	User      string `bson:"user,omitempty"`
	Address   string `bson:"address,omitempty"`
	UserAgent string `bson:"useragent,omitempty"`
	Token     string `bson:"token,omitempty"`
}

type Error

type Error struct {
	Status  int    `json:"status,omitempty"`
	Error   int    `json:"error,omitempty"`
	Message string `json:"message,omitempty"`
}

type Project

type Project struct {
	Name        string   `bson:"name,omitempty"`
	Description string   `bson:"description,omitempty"`
	Owner       string   `bson:"owner,omitempty"`
	Teams       []string `bson:"teams,omitempty"`
	Wikis       []string `bson:"wikis,omitempty"`
	Notes       []string `bson:"notes,omitempty"`
	Tasks       []string `bson:"tasks,omitempty"`
}

type Request

type Request struct {
	Authorization string `json:"authorization"`
	IP            string `json:"ip"`
	UserAgent     string `json:"userAgent"`
	User          *User  `json:"user"`
}

type Response

type Response struct {
	Code         int         `json:"-"`
	Response     interface{} `json:"response"`
	ResponseTime int64       `json:"response_time"`
}

type Role

type Role struct {
	Name        string `bson:"name,omitempty"`
	Description string `bson:"description,omitempty"`
	Team        string `bson:"team,omitempty"`
	Permissions []int  `bson:"permissions,omitempty"`
}

type Team

type Team struct {
	Name         string   `bson:"name,omitempty"`
	Description  string   `bson:"description,omitempty"`
	ProfilePic   string   `bson:"profilepic,omitempty"`
	Projects     []string `bson:"projects,omitempty"`
	Owner        string   `bson:"owner,omitempty"`
	Members      []string `bson:"members,omitempty"`
	CreationDate string   `bson:"creationdate,omitempty"`
	LastUpdate   string   `bson:"updatedate,omitempty"`
	ID           string   `bson:"_id,omitempty"`
}

func (*Team) Clone

func (t *Team) Clone() *Team

func (*Team) PurgedBson

func (t *Team) PurgedBson(hideID bool) bson.M

type User

type User struct {
	Email          string `bson:"email,omitempty"`
	Password       string `bson:"password,omitempty"`
	Username       string `bson:"username,omitempty"`
	Validated      bool   `bson:"validated"`
	ValidationCode string `bson:"validation_code,omitempty"`
	ProfilePic     string `bson:"profile_pic,omitempty"`
	ID             string `bson:"_id,omitempty"`
}

func (*User) Clone

func (u *User) Clone() *User

func (*User) PurgedBson

func (u *User) PurgedBson() bson.M

Jump to

Keyboard shortcuts

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