Documentation
¶
Index ¶
- func IDEquals(id, other idwrap.IDWrap) bool
- func IDIsZero(id idwrap.IDWrap) bool
- func IsValidContentType(kind ContentType) bool
- type ContentType
- type File
- func (f File) GetCreatedTime() time.Time
- func (f File) GetCreatedTimeUnix() int64
- func (f File) HasContent() bool
- func (f File) IsCredential() bool
- func (f File) IsFlow() bool
- func (f File) IsFolder() bool
- func (f File) IsGraphQL() bool
- func (f File) IsGraphQLDelta() bool
- func (f File) IsHTTP() bool
- func (f File) IsHTTPDelta() bool
- func (f File) IsRoot() bool
- func (f File) IsWebSocket() bool
- func (f File) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidContentType ¶
func IsValidContentType(kind ContentType) bool
IsValidContentType checks if the content type is valid
Types ¶
type ContentType ¶
type ContentType int8
ContentType represents the type of content stored in a file
const ( ContentTypeUnknown ContentType = -1 ContentTypeFolder ContentType = 0 // folder ContentTypeHTTP ContentType = 1 // http ContentTypeHTTPDelta ContentType = 2 // http delta (draft/overlay) ContentTypeFlow ContentType = 3 // flow ContentTypeCredential ContentType = 4 // credential ContentTypeGraphQL ContentType = 5 // graphql ContentTypeWebSocket ContentType = 6 // websocket ContentTypeGraphQLDelta ContentType = 7 // graphql delta (draft/overlay) )
func ContentTypeFromString ¶
func ContentTypeFromString(s string) ContentType
ContentTypeFromString converts a string to ContentType
func (ContentType) String ¶
func (ct ContentType) String() string
String returns the string representation of ContentType
type File ¶
type File struct {
ID idwrap.IDWrap
WorkspaceID idwrap.IDWrap
ParentID *idwrap.IDWrap // Optional parent folder
ContentID *idwrap.IDWrap // References content (can be nil for empty placeholders)
ContentType ContentType // Type of content
Name string
Order float64
PathHash *string
UpdatedAt time.Time
}
File represents a file in the unified file system Uses simple pointer approach - just metadata + content reference
func (File) GetCreatedTime ¶
GetCreatedTime returns the creation time from the ULID
func (File) GetCreatedTimeUnix ¶
GetCreatedTimeUnix returns the creation time as Unix milliseconds
func (File) HasContent ¶
HasContent returns true if the file has associated content
func (File) IsCredential ¶
IsCredential returns true if the file contains a credential
func (File) IsGraphQLDelta ¶
IsGraphQLDelta returns true if the file contains a GraphQL delta request
func (File) IsHTTPDelta ¶
IsHTTPDelta returns true if the file contains an HTTP delta request
func (File) IsWebSocket ¶
IsWebSocket returns true if the file contains a WebSocket connection