Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) CreateDataset(workspaceID string, config DatasetConfig) (*Dataset, error)
- func (c *Client) DeleteDataset(id string) error
- func (c *Client) GetDataset(id string) (*Dataset, error)
- func (c *Client) GetTransform(id string) (*Transform, error)
- func (c *Client) GetWorkspace(id string) (*Workspace, error)
- func (c *Client) ListDatasets() (ds []*Dataset, err error)
- func (c *Client) ListWorkspaces() ([]*Workspace, error)
- func (c *Client) LookupDataset(workspaceID string, label string) (*Dataset, error)
- func (c *Client) Run(reqBody string, vars map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) SetTransform(datasetID string, config *TransformConfig) (*Transform, error)
- func (c *Client) UpdateDataset(workspaceID string, ID string, config DatasetConfig) (*Dataset, error)
- func (c *Client) Verify() error
- type Dataset
- type DatasetConfig
- type Field
- type ResultStatus
- type Stage
- type Transform
- type TransformConfig
- type Workspace
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDatasetNotFound = errors.New("dataset not found")
)
View Source
var (
)
View Source
var (
ErrWorkspaceNotFound = errors.New("workspace not found")
)
View Source
var FieldTypes = []string{
"array",
"bool",
"float64",
"int64",
"object",
"string",
"timestamp",
}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateDataset ¶
func (c *Client) CreateDataset(workspaceID string, config DatasetConfig) (*Dataset, error)
func (*Client) DeleteDataset ¶
DeleteDataset deletes dataset by ID.
func (*Client) ListDatasets ¶
ListDatasets retrieves all datasets across workspaces. No filtering provided for now.
func (*Client) ListWorkspaces ¶
func (*Client) LookupDataset ¶
func (*Client) SetTransform ¶
func (c *Client) SetTransform(datasetID string, config *TransformConfig) (*Transform, error)
func (*Client) UpdateDataset ¶
type Dataset ¶
type Dataset struct {
WorkspaceID string `json:"workspaceId"`
ID string `json:"id"`
Config DatasetConfig `json:"config"`
}
Dataset is published within a workspace
type DatasetConfig ¶
type DatasetConfig struct {
Name string `json:"name,omitempty"`
FreshnessDesired *time.Duration `json:"freshnessDesired,omitempty"`
IconURL *string `json:"iconUrl,omitempty"`
// schema
Fields []*Field `json:"fields,omitempty"`
}
DatasetConfig contains all the configurable elements of a dataset.
type ResultStatus ¶
type ResultStatus struct {
Success bool `json:"success"`
ErrorMessage string `json:"errorMessage"`
DetailedInfo map[string]interface{} `json:"detailedInfo"`
}
func (*ResultStatus) Error ¶
func (s *ResultStatus) Error() error
type Stage ¶
type Stage struct {
Name string `json:"name,omitempty"`
Input string `json:"input,omitempty"`
Pipeline string `json:"pipeline,omitempty"`
}
Stage declares a source to operate on, and a pipeline to execute
type Transform ¶
type Transform struct {
ID string `json:"id"`
*TransformConfig
}
type TransformConfig ¶
type TransformConfig struct {
Inputs map[string]string `json:"inputs"`
References map[string]string `json:"references"`
Stages []*Stage `json:"stages"`
Metadata map[string]string
// contains filtered or unexported fields
}
TransformConfig describes a sequence of stages
func NewTransformConfig ¶
Click to show internal directories.
Click to hide internal directories.