Documentation ¶
Index ¶
- Variables
- type AndQuery
- type ArchiveType
- type Bundle
- 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
- 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
- type EqualsQuery
- type File
- 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
- type KeySearch
- type NaturalQuery
- type NotQuery
- type OrQuery
- type Organization
- 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
- 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
- type SortOrder
- type SortType
- type Sorting
- type StrInListQuery
- type Update
- type UpdateAssign
- type UpdateDelete
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoBundles = errors.New("no bundles found") ErrNoFiles = errors.New("no files found") )
Functions ¶
This section is empty.
Types ¶
type AndQuery ¶
type AndQuery struct {
Children []Query
}
func NewAndQuery ¶
func (*AndQuery) MarshalJSON ¶
type ArchiveType ¶
type ArchiveType int
const ( ArchiveTypeInvalid ArchiveType = iota ArchiveTypeTar ArchiveTypeZip )
type Bundle ¶
type Bundle struct { ID uuid.UUID ProjectID uuid.UUID Files []*File CreatedTime time.Time ModifiedTime time.Time Props map[string]interface{} // contains filtered or unexported fields }
func (*Bundle) DownloadTar ¶
func (b *Bundle) DownloadTar(t ArchiveType) (*DownloadInfo, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DisableTLSVerification ¶
func (c *Client) DisableTLSVerification()
func (*Client) FindBundles ¶
func (*Client) Organization ¶
func (c *Client) Organization(name string) (*Organization, error)
func (*Client) Organizations ¶
func (c *Client) Organizations() ([]*Organization, error)
func (*Client) ProjectSettingsCategory ¶
func (*Client) SearchKeys ¶
func (*Client) SetCredentials ¶
func (*Client) SetRawAuth ¶
func (*Client) SettingsCategory ¶
type DownloadInfo ¶
type EqualsQuery ¶
type EqualsQuery struct { Key string Value interface{} }
func NewEqualsQuery ¶
func NewEqualsQuery(key, value string) *EqualsQuery
func (*EqualsQuery) MarshalJSON ¶
func (q *EqualsQuery) MarshalJSON() ([]byte, error)
type File ¶
type File struct { ID uuid.UUID `json:"file_id"` BundleID uuid.UUID `json:"bundle_id"` ProjectID uuid.UUID `json:"project_id"` CreatedTime time.Time `json:"created_time"` ModifiedTime time.Time `json:"modified_time"` Downloads int64 `json:"downloads"` Size int64 `json:"size"` Props map[string]interface{} // contains filtered or unexported fields }
func (*File) Download ¶
func (f *File) Download() (*DownloadInfo, error)
type KeyExistsQuery ¶
type KeyExistsQuery struct {
Key string
}
func NewKeyExistsQuery ¶
func NewKeyExistsQuery(key string) *KeyExistsQuery
func (*KeyExistsQuery) MarshalJSON ¶
func (q *KeyExistsQuery) MarshalJSON() ([]byte, error)
type NaturalQuery ¶
type NaturalQuery struct {
Query string
}
func NewNaturalQuery ¶
func NewNaturalQuery(q string) *NaturalQuery
func (*NaturalQuery) MarshalJSON ¶
func (n *NaturalQuery) MarshalJSON() ([]byte, error)
type NotQuery ¶
type NotQuery struct {
Child Query
}
func NewNotQuery ¶
func (*NotQuery) MarshalJSON ¶
type OrQuery ¶
type OrQuery struct {
Children []Query
}
func NewOrQuery ¶
func (*OrQuery) MarshalJSON ¶
type Organization ¶
func (*Organization) FindBundle ¶
func (*Organization) FindBundles ¶
func (*Organization) Projects ¶
func (o *Organization) Projects() ([]*Project, error)
type Project ¶
type Project struct { ID uuid.UUID OrganizationID uuid.UUID Name string // contains filtered or unexported fields }
func (*Project) FindBundle ¶
func (*Project) FindBundles ¶
type StrInListQuery ¶
func NewStrInListQuery ¶
func NewStrInListQuery(key string, values []string) *StrInListQuery
func (*StrInListQuery) MarshalJSON ¶
func (q *StrInListQuery) MarshalJSON() ([]byte, error)
type Update ¶
type Update struct { Assign UpdateAssign `json:"assign"` Delete UpdateDelete `json:"delete"` }
type UpdateAssign ¶
type UpdateAssign struct { Key string `json:"key"` Value interface{} `json:"value"` }
type UpdateDelete ¶
type UpdateDelete struct {
Key string `json:"key"`
}
Click to show internal directories.
Click to hide internal directories.