Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateDestination(srcName string, destName string, connMode string, enabled bool, ...) (Destination, error)
- func (c *Client) CreateSource(srcName string, catName string) (Source, error)
- func (c *Client) DeleteDestination(srcName string, destName string) error
- func (c *Client) DeleteSource(srcName string) error
- func (c *Client) GetDestination(srcName string, destName string) (Destination, error)
- func (c *Client) GetSource(srcName string) (Source, error)
- func (c *Client) GetWorkspace() (Workspace, error)
- func (c *Client) ListDestinations(srcName string) (Destinations, error)
- func (c *Client) ListSources() (Sources, error)
- func (c *Client) UpdateDestination(srcName string, destName string, enabled bool, configs []DestinationConfig) (Destination, error)
- type Destination
- type DestinationConfig
- type Destinations
- type LibraryConfig
- type Source
- type Sources
- type UpdateMask
- type Workspace
Constants ¶
const ( // WorkspacesEndpoint is the API endpoint for listing workspaces WorkspacesEndpoint = "workspaces" // SourceEndpoint is the API endpoint for interacting with sources SourceEndpoint = "sources" // DestinationEndpoint is the API endpoint for interacting with destinations DestinationEndpoint = "destinations" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages communication with Segment Config API.
func (*Client) CreateDestination ¶
func (c *Client) CreateDestination(srcName string, destName string, connMode string, enabled bool, configs []DestinationConfig) (Destination, error)
CreateDestination creates a new destination for a source
func (*Client) CreateSource ¶
CreateSource creates a new source
func (*Client) DeleteDestination ¶ added in v0.1.1
DeleteDestination deletes a destination for a source from the workspace
func (*Client) DeleteSource ¶
DeleteSource deletes a source from the workspace
func (*Client) GetDestination ¶
func (c *Client) GetDestination(srcName string, destName string) (Destination, error)
GetDestination returns information about a destination for a source
func (*Client) GetWorkspace ¶
GetWorkspace returns information about a workspace
func (*Client) ListDestinations ¶
func (c *Client) ListDestinations(srcName string) (Destinations, error)
ListDestinations returns all destinations for a source
func (*Client) ListSources ¶
ListSources returns all sources for a workspace
func (*Client) UpdateDestination ¶
func (c *Client) UpdateDestination(srcName string, destName string, enabled bool, configs []DestinationConfig) (Destination, error)
UpdateDestination updates an existing destination with a new config
type Destination ¶
type Destination struct { Name string `json:"name,omitempty"` Parent string `json:"parent,omitempty"` DisplayName string `json:"display_name,omitempty"` Enabled bool `json:"enabled,omitempty"` ConnectionMode string `json:"connection_mode,omitempty"` Configs []DestinationConfig `json:"config,omitempty"` CreateTime time.Time `json:"create_time,omitempty"` UpdateTime time.Time `json:"update_time,omitempty"` }
Destination defines the struct for the destination object
type DestinationConfig ¶
type DestinationConfig struct { Name string `json:"name,omitempty"` DisplayName string `json:"display_name,omitempty"` Value interface{} `json:"value,omitempty"` Type string `json:"type,omitempty"` }
DestinationConfig contains information about how a Destination is configured
type Destinations ¶
type Destinations struct {
Destinations []Destination `json:"destinations,omitempty"`
}
Destinations defines the struct for the destination object
type LibraryConfig ¶
type LibraryConfig struct { MetricsEnabled bool `json:"metrics_enabled,omitempty"` RetryQueue bool `json:"retry_queue,omitempty"` CrossDomainIDEnabled bool `json:"cross_domain_id_enabled,omitempty"` APIHost string `json:"api_host,omitempty"` }
LibraryConfig contains information about a source's library
type Source ¶
type Source struct { Name string `json:"name,omitempty"` CatalogName string `json:"catalog_name,omitempty"` Parent string `json:"parent,omitempty"` WriteKeys []string `json:"write_keys,omitempty"` LibraryConfig LibraryConfig `json:"library_config,omitempty"` CreateTime time.Time `json:"create_time,omitempty"` }
Source defines the struct for the source object
type Sources ¶
type Sources struct {
Sources []Source `json:"sources,omitempty"`
}
Sources defines the struct for the sources object
type UpdateMask ¶
type UpdateMask struct {
Paths []string `json:"paths,omitempty"`
}
UpdateMask contains information for updating Destinations