model

package
v0.0.0-...-94bde8a Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponce

type ErrorResponce struct {
	MESSAGE string `json:"message" xml:"message" bson:"message"`
	STATUS  uint   `json:"status" xml:"status" bson:"status"`
}

ErrorResponce general server responce

type FileData

type FileData struct {
	ID        string `json:"_id" xml:"_id" bson:"_id"`
	NAME      string `json:"name" xml:"name" bson:"name"`
	TYPE      string `json:"type" xml:"type" bson:"type"`
	OWNERID   string `json:"owner_id" xml:"nowner_idame" bson:"owner_id"`
	PROTECTED bool   `json:"protected" xml:"protected" bson:"protected"`
	DOWNLOADS int    `json:"downloads" xml:"downloads" bson:"downloads"`
	VIEWS     int    `json:"views" xml:"views" bson:"views"`
	BYTES     int64  `json:"bytes" xml:"bytes"`
	UPLOADED  string `json:"uploaded" xml:"uploaded"`
	EXPIRES   string `json:"expires" xml:"expires"`
}

FileData describes a file's metadata in the database

type FileResponce

type FileResponce struct {
	ID        string `json:"_id" xml:"_id" bson:"_id"`
	NAME      string `json:"name" xml:"name" bson:"name"`
	URL       string `json:"url" xml:"url"`
	TYPE      string `json:"type" xml:"type" bson:"type"`
	DOWNLOADS int    `json:"downloads" xml:"downloads" bson:"downloads"`
	VIEWS     int    `json:"views" xml:"views" bson:"views"`
	BYTES     int64  `json:"bytes" xml:"bytes"`
	UPLOADED  string `json:"uploaded" xml:"uploaded"`
	EXPIRES   string `json:"expires" xml:"expires"`
}

FileResponce reponce form the server when performing a file action

type FileStat

type FileStat struct {
	NAME  string `json:"name" xml:"name" bson:"name"`
	ID    string `json:"_id" xml:"_id" bson:"_id"`
	TYPE  string `json:"type" xml:"type" bson:"type"`
	BYTES int64  `json:"bytes" xml:"bytes"`
}

FileStat describes a files server stats

type Token

type Token struct {
	USER  string `json:"user" xml:"user" bson:"user"`
	ADMIN bool   `json:"admin" xml:"admin" bson:"admin"`
	jwt.StandardClaims
}

Token describes a user in the database

type User

type User struct {
	USER     string         `json:"_id" xml:"_id" bson:"_id"`
	PASSWORD []byte         `json:"password" xml:"password" bson:"password"`
	KEY      rsa.PrivateKey `json:"key" xml:"key" bson:"key"`
}

User describes a user in the database

Jump to

Keyboard shortcuts

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