entity

package
v0.0.0-...-2e0bdef Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	ID      vo.FileID   `bson:"_id" json:"id"`
	Name    vo.FileName `bson:"name" json:"name"`
	Path    vo.FilePath `bson:"path" json:"path"`
	Created time.Time   `bson:"created" json:"created"`
}

func NewFile

func NewFile(req FileCreateRequest) (*File, error)

type FileCreateRequest

type FileCreateRequest struct {
	ID   string      `json:"-"`
	Name vo.FileName `json:"name"`
	Path vo.FilePath `json:"path"`
	Now  time.Time   `json:"-"`
}

func (FileCreateRequest) Validate

func (r FileCreateRequest) Validate() error

Jump to

Keyboard shortcuts

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