Documentation ¶
Index ¶
- Variables
- type ArchiveExtractionStatus
- type Asset
- func (a *Asset) ArchiveExtractionStatus() *ArchiveExtractionStatus
- func (a *Asset) Clone() *Asset
- func (a *Asset) CreatedAt() time.Time
- func (a *Asset) FileName() string
- func (a *Asset) FlatFiles() bool
- func (a *Asset) ID() ID
- func (a *Asset) Integration() *IntegrationID
- func (a *Asset) PreviewType() *PreviewType
- func (a *Asset) Project() ProjectID
- func (a *Asset) Size() uint64
- func (a *Asset) Thread() ThreadID
- func (a *Asset) UUID() string
- func (a *Asset) UpdateArchiveExtractionStatus(s *ArchiveExtractionStatus)
- func (a *Asset) UpdatePreviewType(p *PreviewType)
- func (a *Asset) User() *accountdomain.UserID
- type Builder
- func (b *Builder) ArchiveExtractionStatus(s *ArchiveExtractionStatus) *Builder
- func (b *Builder) Build() (*Asset, error)
- func (b *Builder) CreatedAt(createdAt time.Time) *Builder
- func (b *Builder) CreatedByIntegration(createdBy IntegrationID) *Builder
- func (b *Builder) CreatedByUser(createdBy accountdomain.UserID) *Builder
- func (b *Builder) FileName(name string) *Builder
- func (b *Builder) FlatFiles(flatFiles bool) *Builder
- func (b *Builder) ID(id ID) *Builder
- func (b *Builder) MustBuild() *Asset
- func (b *Builder) NewID() *Builder
- func (b *Builder) NewUUID() *Builder
- func (b *Builder) Project(pid ProjectID) *Builder
- func (b *Builder) Size(size uint64) *Builder
- func (b *Builder) Thread(th ThreadID) *Builder
- func (b *Builder) Type(t *PreviewType) *Builder
- func (b *Builder) UUID(uuid string) *Builder
- type File
- func (f *File) AppendChild(c *File)
- func (f *File) Children() []*File
- func (f *File) Clone() *File
- func (f *File) ContentType() string
- func (f *File) FilePaths() []string
- func (f *File) Files() []*File
- func (f *File) FlattenChildren() (res []*File)
- func (f *File) IsDir() bool
- func (f *File) Name() string
- func (f *File) Path() string
- func (f *File) RootPath(uuid string) string
- func (f *File) SetFiles(s []*File)
- func (f *File) SetName(n string)
- func (f *File) Size() uint64
- type FileBuilder
- func (b *FileBuilder) Build() *File
- func (b *FileBuilder) Children(children []*File) *FileBuilder
- func (b *FileBuilder) ContentType(contentType string) *FileBuilder
- func (b *FileBuilder) Dir() *FileBuilder
- func (b *FileBuilder) Files(files []*File) *FileBuilder
- func (b *FileBuilder) GuessContentType() *FileBuilder
- func (b *FileBuilder) Name(name string) *FileBuilder
- func (b *FileBuilder) Path(filePath string) *FileBuilder
- func (b *FileBuilder) Size(size uint64) *FileBuilder
- type ID
- type IDList
- type IntegrationID
- type List
- type Map
- type PreviewType
- type ProjectID
- type ThreadID
- type URLResolver
- type Upload
- type UploadBuilder
- func (b *UploadBuilder) Build() *Upload
- func (b *UploadBuilder) ContentLength(contentLength int64) *UploadBuilder
- func (b *UploadBuilder) ExpiresAt(expiresAt time.Time) *UploadBuilder
- func (b *UploadBuilder) FileName(fileName string) *UploadBuilder
- func (b *UploadBuilder) Project(project ProjectID) *UploadBuilder
- func (b *UploadBuilder) UUID(uuid string) *UploadBuilder
- type UserID
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoProjectID = rerror.NewE(i18n.T("projectID is required")) ErrZeroSize = rerror.NewE(i18n.T("file size cannot be zero")) ErrNoUser = rerror.NewE(i18n.T("createdBy is required")) ErrNoThread = rerror.NewE(i18n.T("thread is required")) ErrNoUUID = rerror.NewE(i18n.T("uuid is required")) )
View Source
var ErrInvalidID = id.ErrInvalidID
View Source
var IDFrom = id.AssetIDFrom
View Source
var IDFromRef = id.AssetIDFromRef
View Source
var MustID = id.MustAssetID
View Source
var MustProjectID = id.MustProjectID
View Source
var MustThreadID = id.MustThreadID
View Source
var MustUserID = id.MustUserID
View Source
var NewID = id.NewAssetID
View Source
var NewIntegrationID = id.NewIntegrationID
View Source
var NewProjectID = id.NewProjectID
View Source
var NewThreadID = id.NewThreadID
View Source
var NewUserID = accountdomain.NewUserID
View Source
var ProjectIDFrom = id.ProjectIDFrom
View Source
var ProjectIDFromRef = id.ProjectIDFromRef
View Source
var ThreadIDFrom = id.ThreadIDFrom
View Source
var ThreadIDFromRef = id.ThreadIDFromRef
View Source
var UserIDFrom = accountdomain.UserIDFrom
View Source
var UserIDFromRef = accountdomain.UserIDFromRef
Functions ¶
This section is empty.
Types ¶
type ArchiveExtractionStatus ¶
type ArchiveExtractionStatus string
const ( ArchiveExtractionStatusSkipped ArchiveExtractionStatus = "skipped" ArchiveExtractionStatusPending ArchiveExtractionStatus = "pending" ArchiveExtractionStatusInProgress ArchiveExtractionStatus = "in_progress" ArchiveExtractionStatusDone ArchiveExtractionStatus = "done" ArchiveExtractionStatusFailed ArchiveExtractionStatus = "failed" )
func ArchiveExtractionStatusFrom ¶
func ArchiveExtractionStatusFrom(s string) (ArchiveExtractionStatus, bool)
func ArchiveExtractionStatusFromRef ¶
func ArchiveExtractionStatusFromRef(s *string) *ArchiveExtractionStatus
func (ArchiveExtractionStatus) String ¶
func (s ArchiveExtractionStatus) String() string
func (*ArchiveExtractionStatus) StringRef ¶
func (s *ArchiveExtractionStatus) StringRef() *string
type Asset ¶
type Asset struct {
// contains filtered or unexported fields
}
func (*Asset) ArchiveExtractionStatus ¶
func (a *Asset) ArchiveExtractionStatus() *ArchiveExtractionStatus
func (*Asset) Integration ¶
func (a *Asset) Integration() *IntegrationID
func (*Asset) PreviewType ¶
func (a *Asset) PreviewType() *PreviewType
func (*Asset) UpdateArchiveExtractionStatus ¶
func (a *Asset) UpdateArchiveExtractionStatus(s *ArchiveExtractionStatus)
func (*Asset) UpdatePreviewType ¶
func (a *Asset) UpdatePreviewType(p *PreviewType)
func (*Asset) User ¶
func (a *Asset) User() *accountdomain.UserID
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) ArchiveExtractionStatus ¶
func (b *Builder) ArchiveExtractionStatus(s *ArchiveExtractionStatus) *Builder
func (*Builder) CreatedByIntegration ¶
func (b *Builder) CreatedByIntegration(createdBy IntegrationID) *Builder
func (*Builder) CreatedByUser ¶
func (b *Builder) CreatedByUser(createdBy accountdomain.UserID) *Builder
func (*Builder) Type ¶
func (b *Builder) Type(t *PreviewType) *Builder
type File ¶
type File struct {
// contains filtered or unexported fields
}
func FoldFiles ¶
FoldFiles organizes files into directories and returns the files as children of the parent directory. The parent directory refers to a zip file located in the root directory and is treated as the root directory.
func (*File) AppendChild ¶
func (*File) ContentType ¶
func (*File) FlattenChildren ¶
FlattenChildren recursively collects all children of the File object into a flat slice. It returns a slice of File objects containing all children in a flattened structure.
type FileBuilder ¶
type FileBuilder struct {
// contains filtered or unexported fields
}
func NewFile ¶
func NewFile() *FileBuilder
func (*FileBuilder) Build ¶
func (b *FileBuilder) Build() *File
func (*FileBuilder) Children ¶
func (b *FileBuilder) Children(children []*File) *FileBuilder
func (*FileBuilder) ContentType ¶
func (b *FileBuilder) ContentType(contentType string) *FileBuilder
func (*FileBuilder) Dir ¶
func (b *FileBuilder) Dir() *FileBuilder
func (*FileBuilder) Files ¶
func (b *FileBuilder) Files(files []*File) *FileBuilder
func (*FileBuilder) GuessContentType ¶
func (b *FileBuilder) GuessContentType() *FileBuilder
func (*FileBuilder) Name ¶
func (b *FileBuilder) Name(name string) *FileBuilder
func (*FileBuilder) Path ¶
func (b *FileBuilder) Path(filePath string) *FileBuilder
func (*FileBuilder) Size ¶
func (b *FileBuilder) Size(size uint64) *FileBuilder
type IDList ¶
type IDList = id.AssetIDList
type IntegrationID ¶
type IntegrationID = id.IntegrationID
type PreviewType ¶
type PreviewType string
const ( PreviewTypeImage PreviewType = "image" PreviewTypeImageSvg PreviewType = "image_svg" PreviewTypeGeo PreviewType = "geo" PreviewTypeGeo3dTiles PreviewType = "geo_3d_tiles" PreviewTypeGeoMvt PreviewType = "geo_mvt" PreviewTypeModel3d PreviewType = "model_3d" PreviewTypeCSV PreviewType = "csv" PreviewTypeUnknown PreviewType = "unknown" )
func DetectPreviewType ¶
func DetectPreviewType(f *file.File) *PreviewType
func PreviewTypeFrom ¶
func PreviewTypeFrom(p string) (PreviewType, bool)
func PreviewTypeFromContentType ¶
func PreviewTypeFromContentType(c string) PreviewType
func PreviewTypeFromExtension ¶
func PreviewTypeFromExtension(ext string) PreviewType
func PreviewTypeFromRef ¶
func PreviewTypeFromRef(p *string) *PreviewType
func (PreviewType) Ref ¶
func (p PreviewType) Ref() *PreviewType
func (PreviewType) String ¶
func (p PreviewType) String() string
func (*PreviewType) StringRef ¶
func (p *PreviewType) StringRef() *string
type URLResolver ¶
type Upload ¶
type Upload struct {
// contains filtered or unexported fields
}
func (*Upload) ContentLength ¶
type UploadBuilder ¶
type UploadBuilder struct {
// contains filtered or unexported fields
}
func NewUpload ¶
func NewUpload() *UploadBuilder
func (*UploadBuilder) Build ¶
func (b *UploadBuilder) Build() *Upload
func (*UploadBuilder) ContentLength ¶
func (b *UploadBuilder) ContentLength(contentLength int64) *UploadBuilder
func (*UploadBuilder) ExpiresAt ¶
func (b *UploadBuilder) ExpiresAt(expiresAt time.Time) *UploadBuilder
func (*UploadBuilder) FileName ¶
func (b *UploadBuilder) FileName(fileName string) *UploadBuilder
func (*UploadBuilder) Project ¶
func (b *UploadBuilder) Project(project ProjectID) *UploadBuilder
func (*UploadBuilder) UUID ¶
func (b *UploadBuilder) UUID(uuid string) *UploadBuilder
type UserID ¶
type UserID = accountdomain.UserID
Click to show internal directories.
Click to hide internal directories.