dto

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CreateFileNodeFromDTO

func CreateFileNodeFromDTO(meta CreateFileNode) model.CreateFileNode

Types

type CreateFileNode

type CreateFileNode struct {
	Name        string  `json:"name"`
	Path        string  `json:"path"`
	Description string  `json:"description"`
	IsFolder    bool    `json:"isFolder"`
	MimeType    *string `json:"mimeType"`
}

type FileNode

type FileNode struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	Description string     `json:"description"`
	IsFolder    bool       `json:"isFolder"`
	State       NodeState  `json:"state"`
	MimeType    *string    `json:"mimeType"`
	Size        int64      `json:"size"`
	Children    []FileNode `json:"children"`
}

func FileNodeFromModel

func FileNodeFromModel(fileNode model.FileNode) FileNode

type NodeState

type NodeState string
const (
	NodeStateUpload NodeState = "UPLOAD"
	NodeStateReady  NodeState = "READY"
)

func (NodeState) IsValid

func (e NodeState) IsValid() bool

func (NodeState) MarshalGQL

func (e NodeState) MarshalGQL(w io.Writer)

func (NodeState) String

func (e NodeState) String() string

func (*NodeState) UnmarshalGQL

func (e *NodeState) UnmarshalGQL(v interface{}) error

type UpdateFileNode added in v0.1.5

type UpdateFileNode struct {
	Name        *string `json:"name"`
	Description *string `json:"description"`
}

Jump to

Keyboard shortcuts

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