Documentation ¶ Index ¶ type ByteSize func (b ByteSize) String() string type ID func NewFileID() ID type Info type Service type Storage Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type ByteSize ¶ type ByteSize float64 const ( KiB ByteSize MiB GiB TiB PiB EiB ZiB ) func (ByteSize) String ¶ func (b ByteSize) String() string type ID ¶ type ID string func NewFileID ¶ func NewFileID() ID type Info ¶ type Info struct { ID ID `json:"id"` Name string `json:"name"` Type string `json:"type"` Size ByteSize `json:"size"` CreatedAt time.Time `json:"created_at"` DeletedAt optional.Optional[time.Time] `json:"deleted_at"` } type Service ¶ type Service interface { Upload(context.Context, Info, io.Reader) (ID, error) Get(context.Context, ID) (io.ReadCloser, error) GetFileInfo(context.Context, ID) (Info, error) Delete(context.Context, ID) error } type Storage ¶ type Storage interface { Store(context.Context, Info) (ID, error) Find(context.Context, ID) (Info, error) Delete(context.Context, ID) error } Source Files ¶ View all Source files bytesize.go file.go Click to show internal directories. Click to hide internal directories.