Versions in this module Expand all Collapse all v0 v0.1.1 Mar 14, 2023 v0.1.0 Mar 13, 2023 Changes in this version + var ErrNoBundles = errors.New("no bundles found") + var ErrNoFiles = errors.New("no files found") + type AndQuery struct + Children []Query + func NewAndQuery(children []Query) *AndQuery + func (n *AndQuery) MarshalJSON() ([]byte, error) + type ArchiveType int + const ArchiveTypeInvalid + const ArchiveTypeTar + const ArchiveTypeZip + type Bundle struct + CreatedTime time.Time + Files []*File + ID uuid.UUID + ModifiedTime time.Time + ProjectID uuid.UUID + Props map[string]interface{} + func (b *Bundle) DownloadTar(t ArchiveType) (*DownloadInfo, error) + func (b *Bundle) FindFile(q Query, s Sorting, limit int) (*File, error) + func (b *Bundle) FindFiles(q Query, s Sorting, limit int) ([]*File, error) + func (b *Bundle) Get(key string) interface{} + func (b *Bundle) GetInt(key string) int + func (b *Bundle) GetObject(key string) map[string]interface{} + func (b *Bundle) GetString(key string) string + func (b *Bundle) Restore() error + func (b *Bundle) Set(m map[string]interface{}) error + func (b *Bundle) Trash() error + func (b *Bundle) Update(cmd []Update) error + func (b *Bundle) Upload(r io.Reader, m map[string]string) (*File, error) + type Client struct + func New(address string) *Client + func (c *Client) Bundle(id uuid.UUID) (*Bundle, error) + func (c *Client) DisableTLSVerification() + func (c *Client) File(id uuid.UUID) (*File, error) + func (c *Client) FileNoProps(id uuid.UUID) (*File, error) + func (c *Client) FindBundle(q Query, s Sorting) (*Bundle, error) + func (c *Client) FindBundles(q Query, s Sorting, limit int) ([]*Bundle, error) + func (c *Client) FindFile(q Query, s Sorting) (*File, error) + func (c *Client) FindFiles(q Query, s Sorting, limit int) ([]*File, error) + func (c *Client) Login(username, password string) error + func (c *Client) Organization(name string) (*Organization, error) + func (c *Client) Organizations() ([]*Organization, error) + func (c *Client) Project(name string) (*Project, error) + func (c *Client) ProjectSettingsCategory(proj, cat string, v interface{}) error + func (c *Client) SearchKeys(s KeySearch) ([]keyResult, error) + func (c *Client) SetAPIKey(apikey string) + func (c *Client) SetCredentials(username, password string) + func (c *Client) SetRawAuth(auth string) + func (c *Client) SetToken(token string) + func (c *Client) SettingsCategory(cat string, v interface{}) error + type DownloadInfo struct + Body io.ReadCloser + Header http.Header + SHA512 []byte + Size int64 + type EqualsQuery struct + Key string + Value interface{} + func NewEqualsQuery(key, value string) *EqualsQuery + func (q *EqualsQuery) MarshalJSON() ([]byte, error) + type File struct + BundleID uuid.UUID + CreatedTime time.Time + Downloads int64 + ID uuid.UUID + ModifiedTime time.Time + ProjectID uuid.UUID + Props map[string]interface{} + Size int64 + func (f *File) Download() (*DownloadInfo, error) + func (f *File) Get(key string) interface{} + func (f *File) GetInt(key string) int + func (f *File) GetObject(key string) map[string]interface{} + func (f *File) GetString(key string) string + func (f *File) Restore() error + func (f *File) Set(m map[string]interface{}) error + func (f *File) Trash() error + func (f *File) Update(cmd []Update) error + type KeyExistsQuery struct + Key string + func NewKeyExistsQuery(key string) *KeyExistsQuery + func (q *KeyExistsQuery) MarshalJSON() ([]byte, error) + type KeySearch struct + Distinct bool + IncludeGarbage bool + Keys []string + Limit int + Query Query + Sorting Sorting + Table string + type NaturalQuery struct + Query string + func NewNaturalQuery(q string) *NaturalQuery + func (n *NaturalQuery) MarshalJSON() ([]byte, error) + type NotQuery struct + Child Query + func NewNotQuery(child Query) *NotQuery + func (n *NotQuery) MarshalJSON() ([]byte, error) + type OrQuery struct + Children []Query + func NewOrQuery(children []Query) *OrQuery + func (n *OrQuery) MarshalJSON() ([]byte, error) + type Organization struct + ID uuid.UUID + Name string + func (o *Organization) FindBundle(q Query, s Sorting, limit int) (*Bundle, error) + func (o *Organization) FindBundles(q Query, s Sorting, limit int) ([]*Bundle, error) + func (o *Organization) FindFile(q Query, s Sorting, limit int) (*File, error) + func (o *Organization) FindFiles(q Query, s Sorting, limit int) ([]*File, error) + func (o *Organization) Projects() ([]*Project, error) + type Project struct + ID uuid.UUID + Name string + OrganizationID uuid.UUID + func (p *Project) FindBundle(q Query, s Sorting, limit int) (*Bundle, error) + func (p *Project) FindBundles(q Query, s Sorting, limit int) ([]*Bundle, error) + func (p *Project) FindFile(q Query, s Sorting, limit int) (*File, error) + func (p *Project) FindFiles(q Query, s Sorting, limit int) ([]*File, error) + type Query interface + MarshalJSON func() ([]byte, error) + type SortOrder int + const SortOrderAscending + const SortOrderDescending + const SortOrderNone + func (s SortOrder) MarshalText() ([]byte, error) + type SortType int + const SortTypeAlphanumerical + const SortTypeChronological + const SortTypeChronologicalModification + const SortTypeNatural + const SortTypeNone + func (s SortType) MarshalText() ([]byte, error) + type Sorting struct + Key string + Order SortOrder + Sort SortType + type StrInListQuery struct + Key string + Values []string + func NewStrInListQuery(key string, values []string) *StrInListQuery + func (q *StrInListQuery) MarshalJSON() ([]byte, error) + type Update struct + Assign UpdateAssign + Delete UpdateDelete + type UpdateAssign struct + Key string + Value interface{} + type UpdateDelete struct + Key string