models

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

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	ID      NodeID    `json:"id" fc_neo:",unique"`
	Created time.Time `json:"created"`
	Updated time.Time `json:"updated"`

	Size     int64        `json:"size"`
	MimeType NodeMimeType `json:"mime_type" fc_neo:",optional"`

	Name         string   `json:"name" fc_neo:"-"`
	OwnerID      UserID   `json:"owner_id" fc_neo:"-"`
	ParentNodeID *NodeID  `json:"parent_node_id" fc_neo:"-"`
	Type         NodeType `json:"type" fc_neo:"-"`
	IsStarred    bool     `json:"is_starred" fc_neo:"-"`
	Path         string   `json:"path" fc_neo:"-"`
	FullPath     string   `json:"full_path" fc_neo:"-"`

	PerspectiveUserID UserID `json:"-"`
}

type NodeID

type NodeID string

type NodeMimeType

type NodeMimeType string

type NodeType

type NodeType string
const (
	NodeTypeFile   NodeType = "FILE"
	NodeTypeFolder NodeType = "FOLDER"
)

type Session

type Session struct {
	Token      Token     `json:"token" fc_neo:",index"`
	UserID     UserID    `json:"user_id" fc_neo:"-"`
	ValidUntil time.Time `json:"valid_until"`
}

type Share

type Share struct {
	NodeID       NodeID    `json:"node_id" fc_neo:"-"`
	SharedWithID UserID    `json:"shared_with_id" fc_neo:"-"`
	Mode         ShareMode `json:"share_mode"`
}

type ShareMode

type ShareMode string
const (
	ShareModeNone      ShareMode = ""
	ShareModeRead      ShareMode = "READ"
	ShareModeReadWrite ShareMode = "READ_WRITE"
)

type Star

type Star struct {
	NodeID NodeID `json:"node_id"`
	UserID UserID `json:"user_id"`
}

type Token

type Token string

type User

type User struct {
	ID      UserID    `json:"id" fc_neo:",unique"`
	Created time.Time `json:"created"`
	Updated time.Time `json:"updated"`

	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email" fc_neo:",unique"`
	Password  string `json:"password,omitempty"`

	IsAdmin bool `json:"is_admin"`
}

type UserID

type UserID string

type UserUpdate

type UserUpdate struct {
	FirstName *string `json:"first_name"`
	LastName  *string `json:"last_name"`
	Email     *string `json:"email"`
	Password  *string `json:"password"`

	IsAdmin *bool `json:"is_admin"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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