Documentation ¶
Index ¶
- Variables
- type ActivePlugin
- type Categories
- type Category
- type FileInfo
- type FileToUpload
- func (f *FileToUpload) Base64BuildChunk() (chan *FileToUploadChunk, error)
- func (f *FileToUpload) Checked() bool
- func (f *FileToUpload) CreatedAt() *TimeResult
- func (f *FileToUpload) Ext() *string
- func (f *FileToUpload) FullPath() *string
- func (f *FileToUpload) MD5() *string
- func (f *FileToUpload) Size() *int64
- type FileToUploadChunk
- type FileToUploadStat
- func (s *FileToUploadStat) Add()
- func (s *FileToUploadStat) AddBytes(filesize int64)
- func (s *FileToUploadStat) Check()
- func (s *FileToUploadStat) Close()
- func (s *FileToUploadStat) Commit(fileread int64)
- func (s *FileToUploadStat) Done()
- func (s *FileToUploadStat) Error(origin string, filename string, err error)
- func (s *FileToUploadStat) Fail()
- func (s *FileToUploadStat) Skip()
- type ImageDetails
- type Tag
- type Tags
- type TimeResult
- type UploadFileType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ChunkSize int64 = 1 * 1024 * 1024 ChunkBuffSize int64 = 32 * 1024 ChunkBuffCount = ChunkSize / ChunkBuffSize )
Functions ¶
This section is empty.
Types ¶
type ActivePlugin ¶
func (ActivePlugin) MarshalJSON ¶
func (uft ActivePlugin) MarshalJSON() ([]byte, error)
func (ActivePlugin) String ¶
func (uft ActivePlugin) String() string
func (*ActivePlugin) UnmarshalJSON ¶
func (uft *ActivePlugin) UnmarshalJSON(data []byte) error
type Categories ¶
type Categories []*Category
func (*Categories) Names ¶
func (c *Categories) Names() []string
type FileToUpload ¶
type FileToUpload struct { Dir string Name string CategoryId int // contains filtered or unexported fields }
func (*FileToUpload) Base64BuildChunk ¶ added in v0.0.3
func (f *FileToUpload) Base64BuildChunk() (chan *FileToUploadChunk, error)
func (*FileToUpload) Checked ¶
func (f *FileToUpload) Checked() bool
func (*FileToUpload) CreatedAt ¶
func (f *FileToUpload) CreatedAt() *TimeResult
func (*FileToUpload) Ext ¶
func (f *FileToUpload) Ext() *string
func (*FileToUpload) FullPath ¶
func (f *FileToUpload) FullPath() *string
func (*FileToUpload) MD5 ¶
func (f *FileToUpload) MD5() *string
func (*FileToUpload) Size ¶
func (f *FileToUpload) Size() *int64
type FileToUploadChunk ¶
type FileToUploadStat ¶
type FileToUploadStat struct { Checked uint32 Total uint32 Uploaded uint32 Skipped uint32 Failed uint32 UploadedBytes int64 TotalBytes int64 // contains filtered or unexported fields }
func NewFileToUploadStat ¶
func NewFileToUploadStat() *FileToUploadStat
func (*FileToUploadStat) Add ¶
func (s *FileToUploadStat) Add()
func (*FileToUploadStat) AddBytes ¶
func (s *FileToUploadStat) AddBytes(filesize int64)
func (*FileToUploadStat) Check ¶
func (s *FileToUploadStat) Check()
func (*FileToUploadStat) Close ¶
func (s *FileToUploadStat) Close()
func (*FileToUploadStat) Commit ¶
func (s *FileToUploadStat) Commit(fileread int64)
func (*FileToUploadStat) Done ¶
func (s *FileToUploadStat) Done()
func (*FileToUploadStat) Error ¶
func (s *FileToUploadStat) Error(origin string, filename string, err error)
func (*FileToUploadStat) Fail ¶
func (s *FileToUploadStat) Fail()
func (*FileToUploadStat) Skip ¶
func (s *FileToUploadStat) Skip()
type ImageDetails ¶
type ImageDetails struct { Id int `json:"id"` Md5 string `json:"md5sum"` Name string `json:"name"` DateAvailable TimeResult `json:"date_available"` DateCreation TimeResult `json:"date_creation"` LastModified TimeResult `json:"lastmodified"` Width int `json:"width"` Height int `json:"height"` Url string `json:"page_url"` ImageUrl string `json:"element_url"` Filename string `json:"file"` Filesize int64 `json:"filesize"` Categories Categories `json:"categories"` Tags Tags `json:"tags"` Derivatives map[string]struct { Height int `json:"height"` Width int `json:"width"` Url string `json:"url"` } `json:"derivatives"` }
type Tag ¶
type Tag struct { Id int `json:"id,string"` Name string `json:"name"` LastModified TimeResult `json:"lastmodified"` Birthdate TimeResult `json:"birthdate"` Url string `json:"url"` UrlName string `json:"url_name"` ImageUrl string `json:"page_url"` }
func (*Tag) NameWithAgeAt ¶
func (t *Tag) NameWithAgeAt(createdAt *TimeResult) string
type Tags ¶
type Tags []*Tag
func (Tags) NamesWithAgeAt ¶
func (t Tags) NamesWithAgeAt(createdAt *TimeResult) []string
type TimeResult ¶
func (TimeResult) AgeAt ¶
func (c TimeResult) AgeAt(createdAt *TimeResult) string
func (TimeResult) MarshalJSON ¶
func (c TimeResult) MarshalJSON() ([]byte, error)
func (TimeResult) String ¶
func (c TimeResult) String() string
func (*TimeResult) UnmarshalJSON ¶
func (c *TimeResult) UnmarshalJSON(b []byte) error
type UploadFileType ¶
func (UploadFileType) Has ¶
func (uft UploadFileType) Has(s string) bool
func (UploadFileType) MarshalJSON ¶
func (uft UploadFileType) MarshalJSON() ([]byte, error)
func (UploadFileType) String ¶
func (uft UploadFileType) String() string
func (*UploadFileType) UnmarshalJSON ¶
func (uft *UploadFileType) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.