Versions in this module Expand all Collapse all v1 v1.0.1 Apr 2, 2024 v1.0.0 Jul 17, 2023 Changes in this version + func SetHost(host string) + func URL(pathFmt string, a ...interface{}) *url.URL + type Client struct + APIKey string + Agent string + func NewClient(APIKey string, opts ...ClientOption) *Client + func (cli *Client) Delete(url *url.URL, options ...RequestOption) (*Response, error) + func (cli *Client) DeleteData(url *url.URL, data interface{}, options ...RequestOption) (*Response, error) + func (cli *Client) DownloadFile(hash string, w io.Writer) (int64, error) + func (cli *Client) Get(url *url.URL, options ...RequestOption) (*Response, error) + func (cli *Client) GetData(url *url.URL, target interface{}, options ...RequestOption) (*Response, error) + func (cli *Client) GetMetadata() (*Metadata, error) + func (cli *Client) GetObject(url *url.URL, options ...RequestOption) (*Object, error) + func (cli *Client) Iterator(url *url.URL, options ...IteratorOption) (*Iterator, error) + func (cli *Client) NewFeed(t FeedType, options ...FeedOption) (*Feed, error) + func (cli *Client) NewFileScanner() *FileScanner + func (cli *Client) NewMonitorUploader() *MonitorUploader + func (cli *Client) NewURLScanner() *URLScanner + func (cli *Client) Patch(url *url.URL, req *Request, options ...RequestOption) (*Response, error) + func (cli *Client) PatchObject(url *url.URL, obj *Object, options ...RequestOption) error + func (cli *Client) Post(url *url.URL, req *Request, options ...RequestOption) (*Response, error) + func (cli *Client) PostData(url *url.URL, data interface{}, options ...RequestOption) (*Response, error) + func (cli *Client) PostObject(url *url.URL, obj *Object, options ...RequestOption) error + func (cli *Client) Search(query string, options ...IteratorOption) (*Iterator, error) + type ClientOption func(*Client) + func WithGlobalHeader(header, value string) ClientOption + func WithHTTPClient(httpClient *http.Client) ClientOption + type Error struct + Code string + Message string + func (e Error) Error() string + type Feed struct + C chan *Object + func (f *Feed) Cursor() string + func (f *Feed) Error() error + func (f *Feed) Stop() error + type FeedOption func(*Feed) error + func FeedBufferSize(size int) FeedOption + func FeedCursor(cursor string) FeedOption + type FeedType string + const FileFeed + type FileScanner struct + func (s *FileScanner) Scan(r io.Reader, filename string, progress chan<- float32) (*Object, error) + func (s *FileScanner) ScanFile(f *os.File, progress chan<- float32) (*Object, error) + func (s *FileScanner) ScanFileWithParameters(f *os.File, progress chan<- float32, parameters map[string]string) (*Object, error) + func (s *FileScanner) ScanParameters(r io.Reader, filename string, progress chan<- float32, ...) (*Object, error) + type Iterator struct + func (it *Iterator) Close() + func (it *Iterator) Cursor() string + func (it *Iterator) Error() error + func (it *Iterator) Get() *Object + func (it *Iterator) Meta() map[string]interface{} + func (it *Iterator) Next() bool + type IteratorOption func(*Iterator) error + func IteratorBatchSize(n int) IteratorOption + func IteratorCursor(cursor string) IteratorOption + func IteratorDescriptorsOnly(b bool) IteratorOption + func IteratorFilter(filter string) IteratorOption + func IteratorLimit(n int) IteratorOption + type Links struct + Next string + Self string + type Metadata struct + Engines map[string]interface{} + Privileges []string + Relationships map[string][]RelationshipMeta + type MonitorUploader struct + func (s *MonitorUploader) Replace(r io.Reader, monitorItemID string, progress chan<- float32) (*Object, error) + func (s *MonitorUploader) Upload(r io.Reader, monitorPath string, progress chan<- float32) (*Object, error) + type Object struct + func NewObject(objType string) *Object + func NewObjectWithID(objType, id string) *Object + func (obj *Object) Attributes() []string + func (obj *Object) ContextAttributes() []string + func (obj *Object) Get(attr string) (interface{}, error) + func (obj *Object) GetBool(attr string) (b bool, err error) + func (obj *Object) GetContext(attr string) (interface{}, error) + func (obj *Object) GetContextBool(attr string) (b bool, err error) + func (obj *Object) GetContextFloat64(attr string) (float64, error) + func (obj *Object) GetContextInt64(attr string) (int64, error) + func (obj *Object) GetContextString(attr string) (s string, err error) + func (obj *Object) GetFloat64(attr string) (float64, error) + func (obj *Object) GetInt64(attr string) (int64, error) + func (obj *Object) GetRelationship(name string) (*Relationship, error) + func (obj *Object) GetString(attr string) (s string, err error) + func (obj *Object) GetStringSlice(attr string) (s []string, err error) + func (obj *Object) GetTime(attr string) (t time.Time, err error) + func (obj *Object) ID() string + func (obj *Object) MarshalJSON() ([]byte, error) + func (obj *Object) MustGetBool(attr string) bool + func (obj *Object) MustGetFloat64(attr string) float64 + func (obj *Object) MustGetInt64(attr string) int64 + func (obj *Object) MustGetString(attr string) string + func (obj *Object) MustGetStringSlice(attr string) []string + func (obj *Object) MustGetTime(attr string) time.Time + func (obj *Object) Relationships() []string + func (obj *Object) Set(attr string, value interface{}) error + func (obj *Object) SetBool(attr string, value bool) error + func (obj *Object) SetData(key string, val interface{}) + func (obj *Object) SetFloat64(attr string, value float64) error + func (obj *Object) SetInt64(attr string, value int64) error + func (obj *Object) SetString(attr, value string) error + func (obj *Object) SetTime(attr string, value time.Time) error + func (obj *Object) Type() string + func (obj *Object) UnmarshalJSON(data []byte) error + type Relationship struct + func (r *Relationship) IsOneToOne() bool + func (r *Relationship) Objects() []*Object + type RelationshipMeta struct + Description string + Name string + type Request struct + Data interface{} + type RequestOption func(*requestOptions) + func WithHeader(header, value string) RequestOption + type Response struct + Data json.RawMessage + Error Error + Links Links + Meta map[string]interface{} + type URLScanner struct + func (s *URLScanner) Scan(url string) (*Object, error) + type VTClient interface + Delete func(url *url.URL, options ...RequestOption) (*Response, error) + DeleteData func(url *url.URL, data interface{}, options ...RequestOption) (*Response, error) + DownloadFile func(hash string, w io.Writer) (int64, error) + Get func(url *url.URL, options ...RequestOption) (*Response, error) + GetData func(url *url.URL, target interface{}, options ...RequestOption) (*Response, error) + GetMetadata func() (*Metadata, error) + GetObject func(url *url.URL, options ...RequestOption) (*Object, error) + Iterator func(url *url.URL, options ...IteratorOption) (*Iterator, error) + NewFileScanner func() *FileScanner + NewMonitorUploader func() *MonitorUploader + NewURLScanner func() *URLScanner + Patch func(url *url.URL, req *Request, options ...RequestOption) (*Response, error) + PatchObject func(url *url.URL, obj *Object, options ...RequestOption) error + Post func(url *url.URL, req *Request, options ...RequestOption) (*Response, error) + PostData func(url *url.URL, data interface{}, options ...RequestOption) (*Response, error) + PostObject func(url *url.URL, obj *Object, options ...RequestOption) error + Search func(query string, options ...IteratorOption) (*Iterator, error)