Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) CreateDataset(workspaceId string, config *DatasetConfig) (*Dataset, error)
- func (c *Client) CreateForeignKey(workspaceID string, config *ForeignKeyConfig) (*ForeignKey, error)
- func (c *Client) DeleteDataset(id string) error
- func (c *Client) DeleteForeignKey(id string) error
- func (c *Client) GetDataset(id string) (*Dataset, error)
- func (c *Client) GetForeignKey(id string) (*ForeignKey, error)
- func (c *Client) GetWorkspace(id string) (*Workspace, error)
- func (c *Client) LookupDataset(workspaceID string, name string) (*Dataset, error)
- func (c *Client) LookupWorkspace(name string) (*Workspace, error)
- func (c *Client) Run(reqBody string, vars map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) UpdateDataset(workspaceId string, id string, config *DatasetConfig) (*Dataset, error)
- func (c *Client) UpdateForeignKey(id string, config *ForeignKeyConfig) (*ForeignKey, error)
- func (c *Client) Verify() error
- type Dataset
- type DatasetConfig
- type ForeignKey
- type ForeignKeyConfig
- type Input
- type OID
- type Option
- type Stage
- type Type
- type Workspace
- type WorkspaceConfig
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotFound = errors.New("not found")
)
var ( ErrUnauthorized = errors.New("authorization error") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements a grossly simplified API client for Observe
func (*Client) CreateDataset ¶
func (c *Client) CreateDataset(workspaceId string, config *DatasetConfig) (*Dataset, error)
CreateDataset creates dataset
func (*Client) CreateForeignKey ¶ added in v0.13.14
func (c *Client) CreateForeignKey(workspaceID string, config *ForeignKeyConfig) (*ForeignKey, error)
CreateForeignKey
func (*Client) DeleteForeignKey ¶ added in v0.13.14
DeleteForeignKey
func (*Client) GetDataset ¶
GetDataset returns dataset by ID
func (*Client) GetForeignKey ¶ added in v0.13.14
func (c *Client) GetForeignKey(id string) (*ForeignKey, error)
GetForeignKey returns deferred foreign key
func (*Client) GetWorkspace ¶
GetWorkspace by ID
func (*Client) LookupDataset ¶
LookupDataset by name.
func (*Client) LookupWorkspace ¶ added in v0.13.14
LookupWorkspace by name.
func (*Client) UpdateDataset ¶
func (c *Client) UpdateDataset(workspaceId string, id string, config *DatasetConfig) (*Dataset, error)
UpdateDataset updates existing dataset
func (*Client) UpdateForeignKey ¶ added in v0.13.14
func (c *Client) UpdateForeignKey(id string, config *ForeignKeyConfig) (*ForeignKey, error)
UpdateForeignKey by ID
type Dataset ¶
type Dataset struct {
ID string `json:"id"`
WorkspaceID string `json:"workspace_id"`
Version string `json:"version"`
Config *DatasetConfig `json:"config"`
}
Dataset is the output of a sequence of stages operating on a collection of inputs
type DatasetConfig ¶
type DatasetConfig struct {
Name string `json:"name"`
IconURL *string `json:"icon_url"`
Freshness *time.Duration `json:"freshness"`
Inputs map[string]*Input `json:"inputs"`
Stages []*Stage `json:"stages"`
// in practice PathCost is mandatory, since it cannot be set to null
PathCost int64 `json:"path_cost"`
}
DatasetConfig contains configurable elements associated to Dataset
func (*DatasetConfig) Validate ¶
func (c *DatasetConfig) Validate() error
Validate verifies dataset config
type ForeignKey ¶
type ForeignKey struct {
ID string `json:"id"`
Workspace string `json:"workspace"`
Config *ForeignKeyConfig `json:"config"`
}
type ForeignKeyConfig ¶
type Input ¶
type Input struct {
Dataset *string ` json:"dataset,omitempty"`
}
Input references an existing data source
type Option ¶ added in v0.2.0
func WithDomain ¶ added in v0.2.0
WithDomain overrides domain name used
func WithHTTPClient ¶ added in v0.2.0
WithHTTPClient overrides default HTTP client
func WithInsecure ¶ added in v0.2.0
func WithInsecure() Option
WithInsecure sets HTTP client to not verify TLS requests Must be set after WithHTTPClient, if both options are present
func WithUserAgent ¶
func WithUserCredentials ¶ added in v0.2.0
type Stage ¶
type Stage struct {
Alias *string `json:"alias,omitempty"`
Input *string `json:"input,omitempty"`
Pipeline string `json:"pipeline"`
}
Stage applies a pipeline to an input If no input is provided, stage will follow on from previous stage An alias must be provided for callers to be able to reference this stage in OPAL Internally, the alias does not map to the stageID - it is the input name we use when refering to this stage
type Workspace ¶
type Workspace struct {
ID string `json:"id"`
Config *WorkspaceConfig `json:"config"`
Datasets map[string]string `json:"datasets"`
}
Workspace acts as top-level grouping
type WorkspaceConfig ¶
type WorkspaceConfig struct {
Name string `json:"name"`
}
WorkspaceConfig contains configurable elements associated to Workspace