Documentation
¶
Index ¶
- func HasStatusCode(err error, code int) bool
- type Client
- func (client *Client) CreateReferenceTable(ctx context.Context, input *ReferenceTableInput) (*ReferenceTable, error)
- func (c *Client) Delete(path string) (*http.Response, error)
- func (client *Client) DeleteReferenceTable(ctx context.Context, id string) error
- func (c *Client) Get(path string) (*http.Response, error)
- func (client *Client) GetReferenceTable(ctx context.Context, id string) (*ReferenceTable, error)
- func (c *Client) Login(ctx context.Context, user, password string) (string, error)
- func (client *Client) LookupReferenceTable(ctx context.Context, label string) (*ReferenceTable, error)
- func (c *Client) Patch(path string, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) Post(path string, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) Put(path string, contentType string, body io.Reader) (*http.Response, error)
- func (client *Client) UpdateReferenceTable(ctx context.Context, id string, input *ReferenceTableInput) (*ReferenceTable, error)
- func (client *Client) UpdateReferenceTableMetadata(ctx context.Context, id string, input *ReferenceTableMetadataInput) (*ReferenceTable, error)
- type ErrorWithStatusCode
- type ReferenceTable
- type ReferenceTableInput
- type ReferenceTableListResponse
- type ReferenceTableMetadataInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasStatusCode ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements our RESTful customer API
func (*Client) CreateReferenceTable ¶
func (client *Client) CreateReferenceTable(ctx context.Context, input *ReferenceTableInput) (*ReferenceTable, error)
func (*Client) DeleteReferenceTable ¶
func (*Client) GetReferenceTable ¶
func (*Client) LookupReferenceTable ¶
func (*Client) UpdateReferenceTable ¶
func (client *Client) UpdateReferenceTable(ctx context.Context, id string, input *ReferenceTableInput) (*ReferenceTable, error)
func (*Client) UpdateReferenceTableMetadata ¶
func (client *Client) UpdateReferenceTableMetadata(ctx context.Context, id string, input *ReferenceTableMetadataInput) (*ReferenceTable, error)
type ErrorWithStatusCode ¶
func (ErrorWithStatusCode) Error ¶
func (e ErrorWithStatusCode) Error() string
type ReferenceTable ¶
type ReferenceTable struct {
Id string `json:"id"`
Label string `json:"label"`
Description string `json:"description"`
Checksum string `json:"checksum"`
DatasetId string `json:"datasetId"`
}
func (*ReferenceTable) Oid ¶
func (r *ReferenceTable) Oid() oid.OID
type ReferenceTableInput ¶
type ReferenceTableInput struct {
Metadata ReferenceTableMetadataInput `json:"metadata"`
SourceFilePath string `json:"-"`
}
TODO: generate from OpenAPI spec
func (*ReferenceTableInput) RequestBody ¶
func (r *ReferenceTableInput) RequestBody() (body *bytes.Buffer, contentType string, err error)
type ReferenceTableListResponse ¶
type ReferenceTableListResponse struct {
TotalCount int `json:"totalCount"`
ReferenceTables []ReferenceTable `json:"referenceTables"`
}
type ReferenceTableMetadataInput ¶
type ReferenceTableMetadataInput struct {
Label *string `json:"label,omitempty"`
Description *string `json:"description,omitempty"`
PrimaryKey *[]string `json:"primaryKey,omitempty"`
LabelField *string `json:"labelField,omitempty"`
}
All fields are nullable + omitempty to support PATCH semantics (excluding field means leave as is)
Click to show internal directories.
Click to hide internal directories.