Documentation
¶
Overview ¶
Package modzy provides an SDK to easily access the modzy http API.
To use this SDK you need to create a modzy Client and then call any useful functions. For example, if you need to get details about a model:
client := modzy.NewClient("https://your-base-url.example.com").WithAPIKey("your-api-key") details, err := client.Models().GetModelDetails(ctx, &modzy.GetJobDetailsInput{ ModelIdentifier: "e3f73163d3", }) if err != nil { log.Fatalf("Failed to get model details: %v", err) } fmt.Printf("Found latest version: %s\n", details.Details.LatestVersion)
The methods are organized into collections under the main client. For example:
client.Jobs().GetJobDetails(...) client.Models().GetModelDetails(...)
All SDK functions require a context to be provided, and this context is passed to the resulting http.Request. You may choose to use this knowledge to implement custom tracing or other supportability requirements you may have. If cancel a context, the resulting http request, or any other internal processes will halt.
For all cases where a known list of values exists, the SDK functions will use a specific type to help you find those easily. For example, when filtering and/or sorting the job history, there are const values for the various inputs:
listJobsHistoryInput := (&modzy.ListJobsHistoryInput{}). WithFilterOr(modzy.ListJobsHistoryFilterFieldStatus, modzy.JobStatusTimedOut). WithSort(modzy.SortDirectionDescending, modzy.ListJobsHistorySortFieldCreatedAt)
In the case that the API is updated before the SDK can be updated, you can use the const types yourself:
WithFilterOr(modzy.ListJobsHistoryFilterField("new-field"), "a value")
Fake types are provided for each of the main client interfaces to allow for easy mocking during testing:
var clientMock = &modzy.ClientFake{ JobsFunc: func() modzy.JobsClient { return &modzy.JobsClientFake { GetJobDetailsFunc: func(ctx context.Context, input *modzy.GetJobDetailsInput) (*modzy.GetJobDetailsOutput, error) { return nil, fmt.Errorf("No details!") }, } }, }
Index ¶
- Constants
- Variables
- type AccountingClient
- type AccountingClientFake
- func (c *AccountingClientFake) GetEntitlements(ctx context.Context) (*GetEntitlementsOutput, error)
- func (c *AccountingClientFake) GetLicense(ctx context.Context) (*GetLicenseOutput, error)
- func (c *AccountingClientFake) GetProjectDetails(ctx context.Context, input *GetProjectDetailsInput) (*GetProjectDetailsOutput, error)
- func (c *AccountingClientFake) HasEntitlement(ctx context.Context, entitlement string) (bool, error)
- func (c *AccountingClientFake) ListAccountingUsers(ctx context.Context, input *ListAccountingUsersInput) (*ListAccountingUsersOutput, error)
- func (c *AccountingClientFake) ListProjects(ctx context.Context, input *ListProjectsInput) (*ListProjectsOutput, error)
- type AlertSummary
- type AlertType
- type CancelJobInput
- type CancelJobOutput
- type Client
- type ClientFake
- func (c *ClientFake) Accounting() AccountingClient
- func (c *ClientFake) Dashboard() DashboardClient
- func (c *ClientFake) Jobs() JobsClient
- func (c *ClientFake) Models() ModelsClient
- func (c *ClientFake) Resources() ResourcesClient
- func (c *ClientFake) WithAPIKey(apiKey string) Client
- func (c *ClientFake) WithOptions(opts ...ClientOption) Client
- func (c *ClientFake) WithTeamKey(teamID string, token string) Client
- type ClientOption
- type DashboardClient
- type DashboardClientFake
- func (c *DashboardClientFake) GetActiveModels(ctx context.Context, input *GetActiveModelsInput) (*GetActiveModelsOutput, error)
- func (c *DashboardClientFake) GetActiveUsers(ctx context.Context, input *GetActiveUsersInput) (*GetActiveUsersOutput, error)
- func (c *DashboardClientFake) GetAlertDetails(ctx context.Context, input *GetAlertDetailsInput) (*GetAlertDetailsOutput, error)
- func (c *DashboardClientFake) GetAlerts(ctx context.Context, input *GetAlertsInput) (*GetAlertsOutput, error)
- func (c *DashboardClientFake) GetDataProcessed(ctx context.Context, input *GetDataProcessedInput) (*GetDataProcessedOutput, error)
- func (c *DashboardClientFake) GetPredictionsMade(ctx context.Context, input *GetPredictionsMadeInput) (*GetPredictionsMadeOutput, error)
- func (c *DashboardClientFake) GetPrometheusMetric(ctx context.Context, input *GetPrometheusMetricInput) (*GetPrometheusMetricOutput, error)
- type EmbeddedInputItem
- type FileInputEncodable
- type FileInputItem
- type Filter
- type FilterType
- type GetActiveModelsInput
- type GetActiveModelsOutput
- type GetActiveUsersInput
- type GetActiveUsersOutput
- type GetAlertDetailsInput
- type GetAlertDetailsOutput
- type GetAlertsInput
- type GetAlertsOutput
- type GetDataProcessedInput
- type GetDataProcessedOutput
- type GetEntitlementsOutput
- type GetJobDetailsInput
- type GetJobDetailsOutput
- type GetJobFeaturesInput
- type GetJobFeaturesOutput
- type GetJobResultsInput
- type GetJobResultsOutput
- type GetLatestModelsOutput
- type GetLicenseOutput
- type GetMinimumEnginesOutput
- type GetModelDetailsByNameInput
- type GetModelDetailsInput
- type GetModelDetailsOutput
- type GetModelVersionDetailsInput
- type GetModelVersionDetailsOutput
- type GetModelVersionSampleInputInput
- type GetModelVersionSampleInputOutput
- type GetModelVersionSampleOutputInput
- type GetModelVersionSampleOutputOutput
- type GetPredictionsMadeInput
- type GetPredictionsMadeOutput
- type GetProcessingModelsOutput
- type GetProjectDetailsInput
- type GetProjectDetailsOutput
- type GetPrometheusMetricInput
- type GetPrometheusMetricOutput
- type GetRelatedModelsInput
- type GetRelatedModelsOutput
- type GetTagModelsInput
- type GetTagModelsOutput
- type GetTagsOutput
- type JobActions
- type JobsClient
- type JobsClientFake
- func (c *JobsClientFake) CancelJob(ctx context.Context, input *CancelJobInput) (*CancelJobOutput, error)
- func (c *JobsClientFake) GetJobDetails(ctx context.Context, input *GetJobDetailsInput) (*GetJobDetailsOutput, error)
- func (c *JobsClientFake) GetJobFeatures(ctx context.Context) (*GetJobFeaturesOutput, error)
- func (c *JobsClientFake) GetJobResults(ctx context.Context, input *GetJobResultsInput) (*GetJobResultsOutput, error)
- func (c *JobsClientFake) ListJobsHistory(ctx context.Context, input *ListJobsHistoryInput) (*ListJobsHistoryOutput, error)
- func (c *JobsClientFake) SubmitJobEmbedded(ctx context.Context, input *SubmitJobEmbeddedInput) (*SubmitJobEmbeddedOutput, error)
- func (c *JobsClientFake) SubmitJobFile(ctx context.Context, input *SubmitJobFileInput) (*SubmitJobFileOutput, error)
- func (c *JobsClientFake) SubmitJobJDBC(ctx context.Context, input *SubmitJobJDBCInput) (*SubmitJobJDBCOutput, error)
- func (c *JobsClientFake) SubmitJobS3(ctx context.Context, input *SubmitJobS3Input) (*SubmitJobS3Output, error)
- func (c *JobsClientFake) SubmitJobText(ctx context.Context, input *SubmitJobTextInput) (*SubmitJobTextOutput, error)
- func (c *JobsClientFake) WaitForJobCompletion(ctx context.Context, input *WaitForJobCompletionInput, ...) (*GetJobDetailsOutput, error)
- type ListAccountingUsersFilterField
- type ListAccountingUsersInput
- func (i *ListAccountingUsersInput) WithFilter(field ListAccountingUsersFilterField, value string) *ListAccountingUsersInput
- func (i *ListAccountingUsersInput) WithFilterAnd(field ListAccountingUsersFilterField, values ...string) *ListAccountingUsersInput
- func (i *ListAccountingUsersInput) WithFilterOr(field ListAccountingUsersFilterField, values ...string) *ListAccountingUsersInput
- func (i *ListAccountingUsersInput) WithPaging(perPage int, page int) *ListAccountingUsersInput
- type ListAccountingUsersOutput
- type ListJobsHistoryFilterField
- type ListJobsHistoryInput
- func (i *ListJobsHistoryInput) WithFilter(field ListJobsHistoryFilterField, value string) *ListJobsHistoryInput
- func (i *ListJobsHistoryInput) WithFilterAnd(field ListJobsHistoryFilterField, values ...string) *ListJobsHistoryInput
- func (i *ListJobsHistoryInput) WithFilterOr(field ListJobsHistoryFilterField, values ...string) *ListJobsHistoryInput
- func (i *ListJobsHistoryInput) WithPaging(perPage int, page int) *ListJobsHistoryInput
- func (i *ListJobsHistoryInput) WithSort(sortDirection SortDirection, sortBy ...ListJobsHistorySortField) *ListJobsHistoryInput
- type ListJobsHistoryOutput
- type ListJobsHistorySortField
- type ListModelVersionsFilterField
- type ListModelVersionsInput
- func (i *ListModelVersionsInput) WithFilter(field ListModelVersionsFilterField, value string) *ListModelVersionsInput
- func (i *ListModelVersionsInput) WithFilterAnd(field ListModelVersionsFilterField, values ...string) *ListModelVersionsInput
- func (i *ListModelVersionsInput) WithFilterOr(field ListModelVersionsFilterField, values ...string) *ListModelVersionsInput
- func (i *ListModelVersionsInput) WithPaging(perPage int, page int) *ListModelVersionsInput
- type ListModelVersionsOutput
- type ListModelsFilterField
- type ListModelsInput
- func (i *ListModelsInput) WithFilter(field ListModelsFilterField, value string) *ListModelsInput
- func (i *ListModelsInput) WithFilterAnd(field ListModelsFilterField, values ...string) *ListModelsInput
- func (i *ListModelsInput) WithFilterOr(field ListModelsFilterField, values ...string) *ListModelsInput
- func (i *ListModelsInput) WithPaging(perPage int, page int) *ListModelsInput
- type ListModelsOutput
- type ListProjectsFilterField
- type ListProjectsInput
- func (i *ListProjectsInput) WithFilter(field ListProjectsFilterField, value string) *ListProjectsInput
- func (i *ListProjectsInput) WithFilterAnd(field ListProjectsFilterField, values ...string) *ListProjectsInput
- func (i *ListProjectsInput) WithFilterOr(field ListProjectsFilterField, values ...string) *ListProjectsInput
- func (i *ListProjectsInput) WithPaging(perPage int, page int) *ListProjectsInput
- type ListProjectsOutput
- type ModelsClient
- type ModelsClientFake
- func (c *ModelsClientFake) GetLatestModels(ctx context.Context) (*GetLatestModelsOutput, error)
- func (c *ModelsClientFake) GetMinimumEngines(ctx context.Context) (*GetMinimumEnginesOutput, error)
- func (c *ModelsClientFake) GetModelDetails(ctx context.Context, input *GetModelDetailsInput) (*GetModelDetailsOutput, error)
- func (c *ModelsClientFake) GetModelDetailsByName(ctx context.Context, input *GetModelDetailsByNameInput) (*GetModelDetailsOutput, error)
- func (c *ModelsClientFake) GetModelVersionDetails(ctx context.Context, input *GetModelVersionDetailsInput) (*GetModelVersionDetailsOutput, error)
- func (c *ModelsClientFake) GetModelVersionSampleInput(ctx context.Context, input *GetModelVersionSampleInputInput) (*GetModelVersionSampleInputOutput, error)
- func (c *ModelsClientFake) GetModelVersionSampleOutput(ctx context.Context, input *GetModelVersionSampleOutputInput) (*GetModelVersionSampleOutputOutput, error)
- func (c *ModelsClientFake) GetRelatedModels(ctx context.Context, input *GetRelatedModelsInput) (*GetRelatedModelsOutput, error)
- func (c *ModelsClientFake) GetTagModels(ctx context.Context, input *GetTagModelsInput) (*GetTagModelsOutput, error)
- func (c *ModelsClientFake) GetTags(ctx context.Context) (*GetTagsOutput, error)
- func (c *ModelsClientFake) ListModelVersions(ctx context.Context, input *ListModelVersionsInput) (*ListModelVersionsOutput, error)
- func (c *ModelsClientFake) ListModels(ctx context.Context, input *ListModelsInput) (*ListModelsOutput, error)
- func (c *ModelsClientFake) UpdateModelProcessingEngines(ctx context.Context, input *UpdateModelProcessingEnginesInput) (*UpdateModelProcessingEnginesOutput, error)
- type ModzyHTTPError
- type PagingInput
- func (p PagingInput) Next() PagingInput
- func (p PagingInput) WithFilter(field string, value string) PagingInput
- func (p PagingInput) WithFilterAnd(field string, values ...string) PagingInput
- func (p PagingInput) WithFilterOr(field string, values ...string) PagingInput
- func (p PagingInput) WithSort(direction SortDirection, by ...string) PagingInput
- type PrometheusMetricType
- type PrometheusValue
- type ResourcesClient
- type ResourcesClientFake
- type S3InputItem
- type S3Inputable
- type S3KeyDefinition
- type SortDirection
- type SubmitJobEmbeddedInput
- type SubmitJobEmbeddedOutput
- type SubmitJobFileInput
- type SubmitJobFileOutput
- type SubmitJobJDBCInput
- type SubmitJobJDBCOutput
- type SubmitJobOutput
- type SubmitJobS3Input
- type SubmitJobS3Output
- type SubmitJobTextInput
- type SubmitJobTextOutput
- type TextInputItem
- type URIEncodable
- func URIEncodeFile(filename string, mimeType string) URIEncodable
- func URIEncodeReader(notEncodedReader io.Reader, mimeType string) URIEncodable
- func URIEncodeString(notEncodedString string, mimeType string) URIEncodable
- func URIEncodedFile(alreadyEncodedFilename string) URIEncodable
- func URIEncodedReader(alreadyEncoded io.Reader) URIEncodable
- func URIEncodedString(alreadyEncoded string) URIEncodable
- type UpdateModelProcessingEnginesInput
- type UpdateModelProcessingEnginesOutput
- type WaitForJobCompletionInput
Examples ¶
Constants ¶
const ( JobStatusSubmitted = "SUBMITTED" JobStatusInProgress = "IN_PROGRESS" JobStatusCompleted = "COMPLETED" JobStatusCanceled = "CANCELED" JobStatusTimedOut = "TIMEDOUT" JobStatusOpen = "OPEN" )
JobStatus constants for known statuses
const (
DefaultPageSize = 10
)
Variables ¶
var ( ErrNotImplemented = fmt.Errorf("method not implemented") ErrBadRequest = fmt.Errorf("the API doesn’t understand the request. Something is missing") ErrForbidden = fmt.Errorf("the API key doesn’t have the roles required to perform the request") ErrNotFound = fmt.Errorf("the API understands the request but a parameter is missing or misspelled") ErrInternalServer = fmt.Errorf("something went wrong on the server’s side") ErrUnknown = fmt.Errorf("an unknown error was returned") )
Known errors
var AppFs = afero.NewOsFs()
AppFs is exposed for possible mocking
Functions ¶
This section is empty.
Types ¶
type AccountingClient ¶
type AccountingClient interface { // GetEntitlements will get all of your entitlements GetEntitlements(ctx context.Context) (*GetEntitlementsOutput, error) // HasEntitlement will return true if you have the provided entitlement is HasEntitlement(ctx context.Context, entitlement string) (bool, error) // GetLicense returns a truncated view of your license information GetLicense(ctx context.Context) (*GetLicenseOutput, error) // ListAccountingUsers returns account user information ListAccountingUsers(ctx context.Context, input *ListAccountingUsersInput) (*ListAccountingUsersOutput, error) // ListProjects will list your projects ListProjects(ctx context.Context, input *ListProjectsInput) (*ListProjectsOutput, error) // GetProjectDetails will read the details about a project GetProjectDetails(ctx context.Context, input *GetProjectDetailsInput) (*GetProjectDetailsOutput, error) }
type AccountingClientFake ¶
type AccountingClientFake struct { GetEntitlementsFunc func(ctx context.Context) (*GetEntitlementsOutput, error) HasEntitlementFunc func(ctx context.Context, entitlement string) (bool, error) GetLicenseFunc func(ctx context.Context) (*GetLicenseOutput, error) ListAccountingUsersFunc func(ctx context.Context, input *ListAccountingUsersInput) (*ListAccountingUsersOutput, error) ListProjectsFunc func(ctx context.Context, input *ListProjectsInput) (*ListProjectsOutput, error) GetProjectDetailsFunc func(ctx context.Context, input *GetProjectDetailsInput) (*GetProjectDetailsOutput, error) }
AccountingClientFake is meant to help in mocking the AccountingClient interface easily for unit testing.
func (*AccountingClientFake) GetEntitlements ¶
func (c *AccountingClientFake) GetEntitlements(ctx context.Context) (*GetEntitlementsOutput, error)
func (*AccountingClientFake) GetLicense ¶
func (c *AccountingClientFake) GetLicense(ctx context.Context) (*GetLicenseOutput, error)
func (*AccountingClientFake) GetProjectDetails ¶
func (c *AccountingClientFake) GetProjectDetails(ctx context.Context, input *GetProjectDetailsInput) (*GetProjectDetailsOutput, error)
func (*AccountingClientFake) HasEntitlement ¶
func (*AccountingClientFake) ListAccountingUsers ¶
func (c *AccountingClientFake) ListAccountingUsers(ctx context.Context, input *ListAccountingUsersInput) (*ListAccountingUsersOutput, error)
func (*AccountingClientFake) ListProjects ¶
func (c *AccountingClientFake) ListProjects(ctx context.Context, input *ListProjectsInput) (*ListProjectsOutput, error)
type AlertSummary ¶
type CancelJobInput ¶
type CancelJobInput struct {
JobIdentifier string `json:"jobIdentifier"`
}
type CancelJobOutput ¶
type CancelJobOutput struct {
Details model.JobDetails
}
type Client ¶
type Client interface { // WithAPIKey allows you to provided your ApiKey. Use this or WithTeamKey. WithAPIKey(apiKey string) Client // WithTeamKey allows you to provided your team credentials. Use this or WithAPIKey. WithTeamKey(teamID string, token string) Client // WithOptions allows providing additional client options such as WithHTTPDebugging. These are not commonly needed. WithOptions(opts ...ClientOption) Client // Accounting returns a client for access to all accounting related API functions Accounting() AccountingClient // Jobs returns a client for access to all job related API functions Jobs() JobsClient // Models returns a client for access to all model related API functions Models() ModelsClient // Dashboard returns a client for access to dashboard API functions Dashboard() DashboardClient // Resources returns a client for access to resource information Resources() ResourcesClient }
func NewClient ¶
func NewClient(baseURL string, opts ...ClientOption) Client
NewClient will create a standard client for the given baseURL. You need to provide your authentication key to the client through one of two methods:
client.WithAPIKey(apiKey) or client.WithTeamKey(teamID, token)
Example ¶
package main import ( "context" "fmt" "log" modzy "github.com/modzy/sdk-go" ) func main() { ctx := context.TODO() client := modzy.NewClient("https://your-base-url.example.com").WithAPIKey("your-api-key") details, err := client.Models().GetModelDetails(ctx, &modzy.GetModelDetailsInput{ ModelID: "e3f73163d3", }) if err != nil { log.Fatalf("Failed to get model details: %v", err) } fmt.Printf("Found latest version: %s\n", details.Details.LatestVersion) }
Output:
type ClientFake ¶
type ClientFake struct { WithAPIKeyFunc func(apiKey string) Client WithTeamKeyFunc func(teamID string, token string) Client WithOptionsFunc func(opts ...ClientOption) Client AccountingFunc func() AccountingClient JobsFunc func() JobsClient ModelsFunc func() ModelsClient DashboardFunc func() DashboardClient ResourcesFunc func() ResourcesClient }
ClientFake is meant to help in mocking the Client interface easily for unit testing.
func (*ClientFake) Accounting ¶
func (c *ClientFake) Accounting() AccountingClient
func (*ClientFake) Dashboard ¶
func (c *ClientFake) Dashboard() DashboardClient
func (*ClientFake) Jobs ¶
func (c *ClientFake) Jobs() JobsClient
func (*ClientFake) Models ¶
func (c *ClientFake) Models() ModelsClient
func (*ClientFake) Resources ¶
func (c *ClientFake) Resources() ResourcesClient
func (*ClientFake) WithAPIKey ¶
func (c *ClientFake) WithAPIKey(apiKey string) Client
func (*ClientFake) WithOptions ¶
func (c *ClientFake) WithOptions(opts ...ClientOption) Client
func (*ClientFake) WithTeamKey ¶
func (c *ClientFake) WithTeamKey(teamID string, token string) Client
type ClientOption ¶
type ClientOption func(*standardClient)
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) ClientOption
WithHTTPClient allows providing a custom underlying http client. It is good practice to _not_ use the default http client that Go provides as it has no timeouts. If you do not provide your own default client, a reasonable one will be created for you.
func WithHTTPDebugging ¶
func WithHTTPDebugging(request bool, response bool) ClientOption
WithHTTPDebugging will trigger logrus debug messages to be emitted with the raw request and response information. This should only be used for debugging purposes as it can decode entire messages into memory.
type DashboardClient ¶
type DashboardClient interface { GetAlerts(ctx context.Context, input *GetAlertsInput) (*GetAlertsOutput, error) GetAlertDetails(ctx context.Context, input *GetAlertDetailsInput) (*GetAlertDetailsOutput, error) GetDataProcessed(ctx context.Context, input *GetDataProcessedInput) (*GetDataProcessedOutput, error) GetPredictionsMade(ctx context.Context, input *GetPredictionsMadeInput) (*GetPredictionsMadeOutput, error) GetActiveUsers(ctx context.Context, input *GetActiveUsersInput) (*GetActiveUsersOutput, error) GetActiveModels(ctx context.Context, input *GetActiveModelsInput) (*GetActiveModelsOutput, error) GetPrometheusMetric(ctx context.Context, input *GetPrometheusMetricInput) (*GetPrometheusMetricOutput, error) }
type DashboardClientFake ¶
type DashboardClientFake struct { GetAlertsFunc func(ctx context.Context, input *GetAlertsInput) (*GetAlertsOutput, error) GetAlertDetailsFunc func(ctx context.Context, input *GetAlertDetailsInput) (*GetAlertDetailsOutput, error) GetDataProcessedFunc func(ctx context.Context, input *GetDataProcessedInput) (*GetDataProcessedOutput, error) GetPredictionsMadeFunc func(ctx context.Context, input *GetPredictionsMadeInput) (*GetPredictionsMadeOutput, error) GetActiveUsersFunc func(ctx context.Context, input *GetActiveUsersInput) (*GetActiveUsersOutput, error) GetActiveModelsFunc func(ctx context.Context, input *GetActiveModelsInput) (*GetActiveModelsOutput, error) GetPrometheusMetricFunc func(ctx context.Context, input *GetPrometheusMetricInput) (*GetPrometheusMetricOutput, error) }
DashboardClientFake is meant to help in mocking the DashboardClient interface easily for unit testing.
func (*DashboardClientFake) GetActiveModels ¶
func (c *DashboardClientFake) GetActiveModels(ctx context.Context, input *GetActiveModelsInput) (*GetActiveModelsOutput, error)
func (*DashboardClientFake) GetActiveUsers ¶
func (c *DashboardClientFake) GetActiveUsers(ctx context.Context, input *GetActiveUsersInput) (*GetActiveUsersOutput, error)
func (*DashboardClientFake) GetAlertDetails ¶
func (c *DashboardClientFake) GetAlertDetails(ctx context.Context, input *GetAlertDetailsInput) (*GetAlertDetailsOutput, error)
func (*DashboardClientFake) GetAlerts ¶
func (c *DashboardClientFake) GetAlerts(ctx context.Context, input *GetAlertsInput) (*GetAlertsOutput, error)
func (*DashboardClientFake) GetDataProcessed ¶
func (c *DashboardClientFake) GetDataProcessed(ctx context.Context, input *GetDataProcessedInput) (*GetDataProcessedOutput, error)
func (*DashboardClientFake) GetPredictionsMade ¶
func (c *DashboardClientFake) GetPredictionsMade(ctx context.Context, input *GetPredictionsMadeInput) (*GetPredictionsMadeOutput, error)
func (*DashboardClientFake) GetPrometheusMetric ¶
func (c *DashboardClientFake) GetPrometheusMetric(ctx context.Context, input *GetPrometheusMetricInput) (*GetPrometheusMetricOutput, error)
type EmbeddedInputItem ¶
type EmbeddedInputItem map[string]URIEncodable
type FileInputEncodable ¶
FileInputEncodable is a data input that can be provided when using Jobs().SubmitJobFile(...).
Provided implementations of this function are:
FileInputReader FileInputFile
func FileInputFile ¶
func FileInputFile(filename string) FileInputEncodable
func FileInputReader ¶
func FileInputReader(data io.Reader) FileInputEncodable
type FileInputItem ¶
type FileInputItem map[string]FileInputEncodable
type Filter ¶
type Filter struct { Type FilterType Field string Values []string }
type FilterType ¶
type FilterType string
const ( FilterTypeAnd FilterType = "AND" FilterTypeOr FilterType = "OR" )
type GetActiveModelsInput ¶
type GetActiveModelsOutput ¶
type GetActiveModelsOutput struct {
Models []model.ActiveModelSummary `json:"models"`
}
type GetActiveUsersInput ¶
type GetActiveUsersOutput ¶
type GetActiveUsersOutput struct {
Users []model.ActiveUserSummary `json:"users"`
}
type GetAlertDetailsInput ¶
type GetAlertDetailsInput struct {
Type AlertType `json:"type"`
}
GetAlertDetailsInput -
type GetAlertDetailsOutput ¶
type GetAlertDetailsOutput struct { Type AlertType `json:"type"` Entities []string `json:"entities"` }
GetAlertDetailsOutput -
type GetAlertsOutput ¶
type GetAlertsOutput struct {
Alerts []AlertSummary `json:"alerts"`
}
GetAlertsOutput -
type GetDataProcessedInput ¶
type GetDataProcessedInput struct { BeginDate model.ModzyDate EndDate model.ModzyDate UserIdentifier string AccessKeyPrefix string ModelIdentifier string TeamIdentifier string }
GetDataProcessedInput - The default and minimum accepted time between BtartDate and EndDate is 7 days. If only one date is provided the API matches it with a 7 day range.
type GetDataProcessedOutput ¶
type GetDataProcessedOutput struct { Summary model.DataProcessedSummary `json:"dataProcessed"` Recent []model.DataProcessingRecent `json:"recent"` }
type GetEntitlementsOutput ¶
type GetEntitlementsOutput struct {
Entitlements []model.Entitlement `json:"entitlements"`
}
GetEntitlementsOutput -
type GetJobDetailsInput ¶
type GetJobDetailsInput struct {
JobIdentifier string
}
GetJobDetailsInput -
type GetJobDetailsOutput ¶
type GetJobDetailsOutput struct {
Details model.JobDetails `json:"details"`
}
GetJobDetailsOutput -
type GetJobFeaturesInput ¶
type GetJobFeaturesInput struct { }
type GetJobFeaturesOutput ¶
type GetJobFeaturesOutput struct {
Features model.JobFeatures `json:"features"`
}
type GetJobResultsInput ¶
type GetJobResultsInput struct {
JobIdentifier string
}
type GetJobResultsOutput ¶
type GetJobResultsOutput struct {
Results model.JobResults
}
type GetLatestModelsOutput ¶
type GetLatestModelsOutput struct {
Models []model.ModelDetails `json:"models"`
}
type GetLicenseOutput ¶
type GetMinimumEnginesOutput ¶
type GetMinimumEnginesOutput struct {
Details model.MinimumEngines `json:"details"`
}
type GetModelDetailsByNameInput ¶
type GetModelDetailsByNameInput struct {
Name string
}
type GetModelDetailsInput ¶
type GetModelDetailsInput struct {
ModelID string
}
type GetModelDetailsOutput ¶
type GetModelDetailsOutput struct {
Details model.ModelDetails `json:"details"`
}
type GetModelVersionDetailsInput ¶
GetModelVersionDetailsInput -
type GetModelVersionDetailsOutput ¶
type GetModelVersionDetailsOutput struct {
Details model.ModelVersionDetails `json:"details"`
}
GetModelVersionDetailsOutput -
type GetModelVersionSampleInputOutput ¶
type GetModelVersionSampleInputOutput struct {
Sample string `json:"sample"`
}
type GetModelVersionSampleOutputOutput ¶
type GetModelVersionSampleOutputOutput struct {
Sample string `json:"sample"`
}
type GetPredictionsMadeInput ¶
type GetPredictionsMadeInput struct { BeginDate model.ModzyDate EndDate model.ModzyDate UserIdentifier string AccessKeyPrefix string ModelIdentifier string TeamIdentifier string }
GetPredictionsMadeInput - The default and minimum accepted time between BtartDate and EndDate is 7 days. If only one date is provided the API matches it with a 7 day range.
type GetPredictionsMadeOutput ¶
type GetPredictionsMadeOutput struct { Summary model.PredictionsMadeSummary `json:"predictionsMade"` Recent []model.PredictionsMadeRecent `json:"recent"` }
type GetProcessingModelsOutput ¶
type GetProcessingModelsOutput struct {
Models []model.ResourcesProcessingModel `json:"models"`
}
GetProcessingModelsOutput -
type GetProjectDetailsInput ¶
type GetProjectDetailsInput struct {
ProjectID string
}
type GetProjectDetailsOutput ¶
type GetProjectDetailsOutput struct {
Project model.AccountingProject `json:"project"`
}
type GetPrometheusMetricInput ¶
type GetPrometheusMetricInput struct { BeginDate model.ModzyDate EndDate model.ModzyDate Metric PrometheusMetricType }
GetPrometheusMetricInput - The default and minimum accepted time between startDate and endDate is 7 days.
type GetPrometheusMetricOutput ¶
type GetPrometheusMetricOutput struct {
Values []PrometheusValue `json:"values"`
}
type GetRelatedModelsInput ¶
type GetRelatedModelsInput struct {
ModelID string
}
type GetRelatedModelsOutput ¶
type GetRelatedModelsOutput struct {
RelatedModels []model.RelatedModel `json:"relatedModels"`
}
type GetTagModelsInput ¶
type GetTagModelsInput struct {
TagIDs []string
}
type GetTagModelsOutput ¶
type GetTagModelsOutput struct { Tags []model.ModelTag `json:"tags"` Models []model.ModelWithTags `json:"models"` }
type GetTagsOutput ¶
type JobActions ¶
type JobActions interface { // GetDetails will get the details of the job GetDetails(ctx context.Context) (*GetJobDetailsOutput, error) // GetModelDetails will get the details of the related version of its model GetModelDetails(ctx context.Context) (*GetModelVersionDetailsOutput, error) // WaitForCompletion will block until the job is no longer processing WaitForCompletion(ctx context.Context, pollInterval time.Duration) (*GetJobDetailsOutput, error) // Cancel will cancel the a still-processing job Cancel(ctx context.Context) (*CancelJobOutput, error) // GetResults will get the results of a complete job GetResults(ctx context.Context) (*GetJobResultsOutput, error) }
JobActions are a collection shortcut methods when dealing with a single job. This is returned from a SubmitJob function call.
func NewJobActions ¶
func NewJobActions(client Client, jobIdentifier string) JobActions
type JobsClient ¶
type JobsClient interface { // GetJobDetails will get the details of a job GetJobDetails(ctx context.Context, input *GetJobDetailsInput) (*GetJobDetailsOutput, error) // ListJobsHistory will list job history. This supports paging, filtering and sorting. ListJobsHistory(ctx context.Context, input *ListJobsHistoryInput) (*ListJobsHistoryOutput, error) // SubmitJobText will submit a new job of type "text" SubmitJobText(ctx context.Context, input *SubmitJobTextInput) (*SubmitJobTextOutput, error) // SubmitJobEmbedded will submit a new job of type "embedded" which is URI-encoded byte data SubmitJobEmbedded(ctx context.Context, input *SubmitJobEmbeddedInput) (*SubmitJobEmbeddedOutput, error) // SubmitJobFile will submit a new job and post the provided byte data as multiple chunks of data based on your account's maximum chunk size. SubmitJobFile(ctx context.Context, input *SubmitJobFileInput) (*SubmitJobFileOutput, error) // SubmitJobS3 submits a job that reads inputs from an S3 bucket SubmitJobS3(ctx context.Context, input *SubmitJobS3Input) (*SubmitJobS3Output, error) // SubmitJobJDBC submits a job that reads inputs from a Postgres database through a provided query SubmitJobJDBC(ctx context.Context, input *SubmitJobJDBCInput) (*SubmitJobJDBCOutput, error) // WaitForJobCompletion will block until a job has finished processing. WaitForJobCompletion(ctx context.Context, input *WaitForJobCompletionInput, pollInterval time.Duration) (*GetJobDetailsOutput, error) // CancelJob will cancel a job CancelJob(ctx context.Context, input *CancelJobInput) (*CancelJobOutput, error) // GetJobResults will get the results for a job GetJobResults(ctx context.Context, input *GetJobResultsInput) (*GetJobResultsOutput, error) // GetJobFeatures will read settings related to submitting jobs such as chunk size GetJobFeatures(ctx context.Context) (*GetJobFeaturesOutput, error) }
type JobsClientFake ¶
type JobsClientFake struct { GetJobDetailsFunc func(ctx context.Context, input *GetJobDetailsInput) (*GetJobDetailsOutput, error) ListJobsHistoryFunc func(ctx context.Context, input *ListJobsHistoryInput) (*ListJobsHistoryOutput, error) SubmitJobTextFunc func(ctx context.Context, input *SubmitJobTextInput) (*SubmitJobTextOutput, error) SubmitJobEmbeddedFunc func(ctx context.Context, input *SubmitJobEmbeddedInput) (*SubmitJobEmbeddedOutput, error) SubmitJobFileFunc func(ctx context.Context, input *SubmitJobFileInput) (*SubmitJobFileOutput, error) SubmitJobS3Func func(ctx context.Context, input *SubmitJobS3Input) (*SubmitJobS3Output, error) SubmitJobJDBCFunc func(ctx context.Context, input *SubmitJobJDBCInput) (*SubmitJobJDBCOutput, error) WaitForJobCompletionFunc func(ctx context.Context, input *WaitForJobCompletionInput, pollInterval time.Duration) (*GetJobDetailsOutput, error) CancelJobFunc func(ctx context.Context, input *CancelJobInput) (*CancelJobOutput, error) GetJobResultsFunc func(ctx context.Context, input *GetJobResultsInput) (*GetJobResultsOutput, error) GetJobFeaturesFunc func(ctx context.Context) (*GetJobFeaturesOutput, error) }
JobsClientFake is meant to help in mocking the JobsClient interface easily for unit testing.
func (*JobsClientFake) CancelJob ¶
func (c *JobsClientFake) CancelJob(ctx context.Context, input *CancelJobInput) (*CancelJobOutput, error)
func (*JobsClientFake) GetJobDetails ¶
func (c *JobsClientFake) GetJobDetails(ctx context.Context, input *GetJobDetailsInput) (*GetJobDetailsOutput, error)
func (*JobsClientFake) GetJobFeatures ¶
func (c *JobsClientFake) GetJobFeatures(ctx context.Context) (*GetJobFeaturesOutput, error)
func (*JobsClientFake) GetJobResults ¶
func (c *JobsClientFake) GetJobResults(ctx context.Context, input *GetJobResultsInput) (*GetJobResultsOutput, error)
func (*JobsClientFake) ListJobsHistory ¶
func (c *JobsClientFake) ListJobsHistory(ctx context.Context, input *ListJobsHistoryInput) (*ListJobsHistoryOutput, error)
func (*JobsClientFake) SubmitJobEmbedded ¶
func (c *JobsClientFake) SubmitJobEmbedded(ctx context.Context, input *SubmitJobEmbeddedInput) (*SubmitJobEmbeddedOutput, error)
func (*JobsClientFake) SubmitJobFile ¶
func (c *JobsClientFake) SubmitJobFile(ctx context.Context, input *SubmitJobFileInput) (*SubmitJobFileOutput, error)
func (*JobsClientFake) SubmitJobJDBC ¶
func (c *JobsClientFake) SubmitJobJDBC(ctx context.Context, input *SubmitJobJDBCInput) (*SubmitJobJDBCOutput, error)
func (*JobsClientFake) SubmitJobS3 ¶
func (c *JobsClientFake) SubmitJobS3(ctx context.Context, input *SubmitJobS3Input) (*SubmitJobS3Output, error)
func (*JobsClientFake) SubmitJobText ¶
func (c *JobsClientFake) SubmitJobText(ctx context.Context, input *SubmitJobTextInput) (*SubmitJobTextOutput, error)
func (*JobsClientFake) WaitForJobCompletion ¶
func (c *JobsClientFake) WaitForJobCompletion(ctx context.Context, input *WaitForJobCompletionInput, pollInterval time.Duration) (*GetJobDetailsOutput, error)
type ListAccountingUsersFilterField ¶
type ListAccountingUsersFilterField string
ListAccountingUsersFilterField are known field names that can be used when filtering the jobs history
const ( ListAccountingUsersFilterFieldFirstName ListAccountingUsersFilterField = "firstName" ListAccountingUsersFilterFieldLastName ListAccountingUsersFilterField = "lastName" ListAccountingUsersFilterFieldEmail ListAccountingUsersFilterField = "email" ListAccountingUsersFilterFieldSearch ListAccountingUsersFilterField = "search" ListAccountingUsersFilterFieldStatus ListAccountingUsersFilterField = "status" ListAccountingUsersFilterFieldAccessKey ListAccountingUsersFilterField = "accessKey" ListAccountingUsersFilterFieldStartDate ListAccountingUsersFilterField = "startDate" ListAccountingUsersFilterFieldEndDate ListAccountingUsersFilterField = "endDate" ListAccountingUsersFilterFieldSearchDate ListAccountingUsersFilterField = "searchDate" )
type ListAccountingUsersInput ¶
type ListAccountingUsersInput struct {
Paging PagingInput
}
func (*ListAccountingUsersInput) WithFilter ¶
func (i *ListAccountingUsersInput) WithFilter(field ListAccountingUsersFilterField, value string) *ListAccountingUsersInput
func (*ListAccountingUsersInput) WithFilterAnd ¶
func (i *ListAccountingUsersInput) WithFilterAnd(field ListAccountingUsersFilterField, values ...string) *ListAccountingUsersInput
func (*ListAccountingUsersInput) WithFilterOr ¶
func (i *ListAccountingUsersInput) WithFilterOr(field ListAccountingUsersFilterField, values ...string) *ListAccountingUsersInput
func (*ListAccountingUsersInput) WithPaging ¶
func (i *ListAccountingUsersInput) WithPaging(perPage int, page int) *ListAccountingUsersInput
type ListAccountingUsersOutput ¶
type ListAccountingUsersOutput struct { Users []model.AccountingUser `json:"users"` NextPage *ListAccountingUsersInput `json:"nextPage"` }
type ListJobsHistoryFilterField ¶
type ListJobsHistoryFilterField string
ListJobsHistoryFilterField are known field names that can be used when filtering the jobs history
const ( ListJobsHistoryFilterFieldStartDate ListJobsHistoryFilterField = "startDate" ListJobsHistoryFilterFieldEndDate ListJobsHistoryFilterField = "endDate" ListJobsHistoryFilterFieldStatus ListJobsHistoryFilterField = "status" ListJobsHistoryFilterFieldModel ListJobsHistoryFilterField = "model" ListJobsHistoryFilterFieldUser ListJobsHistoryFilterField = "user" ListJobsHistoryFilterFieldAccessKey ListJobsHistoryFilterField = "accessKey" // I see "prefix" in the docs -- what does that mean? )
type ListJobsHistoryInput ¶
type ListJobsHistoryInput struct {
Paging PagingInput
}
func (*ListJobsHistoryInput) WithFilter ¶
func (i *ListJobsHistoryInput) WithFilter(field ListJobsHistoryFilterField, value string) *ListJobsHistoryInput
func (*ListJobsHistoryInput) WithFilterAnd ¶
func (i *ListJobsHistoryInput) WithFilterAnd(field ListJobsHistoryFilterField, values ...string) *ListJobsHistoryInput
func (*ListJobsHistoryInput) WithFilterOr ¶
func (i *ListJobsHistoryInput) WithFilterOr(field ListJobsHistoryFilterField, values ...string) *ListJobsHistoryInput
func (*ListJobsHistoryInput) WithPaging ¶
func (i *ListJobsHistoryInput) WithPaging(perPage int, page int) *ListJobsHistoryInput
func (*ListJobsHistoryInput) WithSort ¶
func (i *ListJobsHistoryInput) WithSort(sortDirection SortDirection, sortBy ...ListJobsHistorySortField) *ListJobsHistoryInput
type ListJobsHistoryOutput ¶
type ListJobsHistoryOutput struct { Jobs []model.JobDetails `json:"jobs"` NextPage *ListJobsHistoryInput `json:"nextPage"` }
type ListJobsHistorySortField ¶
type ListJobsHistorySortField string
ListJobsHistorySortField are known field names that can be used when sorting the jobs history
const ( ListJobsHistorySortFieldIdentifier ListJobsHistorySortField = "identifier" ListJobsHistorySortFieldSubmittedBy ListJobsHistorySortField = "submittedBy" ListJobsHistorySortFieldSubmittedJobs ListJobsHistorySortField = "submittedJobs" ListJobsHistorySortFieldStatus ListJobsHistorySortField = "status" ListJobsHistorySortFieldCreatedAt ListJobsHistorySortField = "createdAt" ListJobsHistorySortFieldUpdatedAt ListJobsHistorySortField = "updatedAt" ListJobsHistorySortFieldSubmittedAt ListJobsHistorySortField = "submittedAt" ListJobsHistorySortFieldTotal ListJobsHistorySortField = "total" ListJobsHistorySortFieldCompleted ListJobsHistorySortField = "completed" ListJobsHistorySortFieldFail ListJobsHistorySortField = "fail" ListJobsHistorySortFieldModel ListJobsHistorySortField = "model" )
type ListModelVersionsFilterField ¶
type ListModelVersionsFilterField string
ListModelVersionsFilterField are known field names that can be used when filtering the model versions list
const ( ListModelVersionsFilterFieldVersion ListModelVersionsFilterField = "version" ListModelVersionsFilterFieldCreatedAt ListModelVersionsFilterField = "createdAt" ListModelVersionsFilterFieldCreatedBy ListModelVersionsFilterField = "createdBy" ListModelVersionsFilterFieldStatus ListModelVersionsFilterField = "status" ListModelVersionsFilterFieldIsAvailable ListModelVersionsFilterField = "isAvailable" ListModelVersionsFilterFieldIsUpdateAt ListModelVersionsFilterField = "updatedAt" ListModelVersionsFilterFieldIsActive ListModelVersionsFilterField = "isActive" ListModelVersionsFilterFieldIsExperimental ListModelVersionsFilterField = "isExperimental" )
type ListModelVersionsInput ¶
type ListModelVersionsInput struct { ModelID string Paging PagingInput }
func (*ListModelVersionsInput) WithFilter ¶
func (i *ListModelVersionsInput) WithFilter(field ListModelVersionsFilterField, value string) *ListModelVersionsInput
func (*ListModelVersionsInput) WithFilterAnd ¶
func (i *ListModelVersionsInput) WithFilterAnd(field ListModelVersionsFilterField, values ...string) *ListModelVersionsInput
func (*ListModelVersionsInput) WithFilterOr ¶
func (i *ListModelVersionsInput) WithFilterOr(field ListModelVersionsFilterField, values ...string) *ListModelVersionsInput
func (*ListModelVersionsInput) WithPaging ¶
func (i *ListModelVersionsInput) WithPaging(perPage int, page int) *ListModelVersionsInput
type ListModelVersionsOutput ¶
type ListModelVersionsOutput struct { Versions []model.ModelVersion `json:"versions"` NextPage *ListModelsInput `json:"nextPage"` }
type ListModelsFilterField ¶
type ListModelsFilterField string
ListModelsFilterField are known field names that can be used when filtering the models list
const ( ListModelsFilterFieldModelID ListModelsFilterField = "modelId" ListModelsFilterFieldAuthor ListModelsFilterField = "author" ListModelsFilterFieldCreatedByEmail ListModelsFilterField = "createdByEmail" ListModelsFilterFieldName ListModelsFilterField = "name" ListModelsFilterFieldDescription ListModelsFilterField = "description" ListModelsFilterFieldIsActive ListModelsFilterField = "isActive" ListModelsFilterFieldIsExpired ListModelsFilterField = "isExpired" ListModelsFilterFieldIsCommercial ListModelsFilterField = "isCommercial" ListModelsFilterFieldIsRecommended ListModelsFilterField = "isRecommended" ListModelsFilterFieldLastActiveDateTime ListModelsFilterField = "lastActiveDateTime" )
type ListModelsInput ¶
type ListModelsInput struct {
Paging PagingInput
}
func (*ListModelsInput) WithFilter ¶
func (i *ListModelsInput) WithFilter(field ListModelsFilterField, value string) *ListModelsInput
func (*ListModelsInput) WithFilterAnd ¶
func (i *ListModelsInput) WithFilterAnd(field ListModelsFilterField, values ...string) *ListModelsInput
func (*ListModelsInput) WithFilterOr ¶
func (i *ListModelsInput) WithFilterOr(field ListModelsFilterField, values ...string) *ListModelsInput
func (*ListModelsInput) WithPaging ¶
func (i *ListModelsInput) WithPaging(perPage int, page int) *ListModelsInput
type ListModelsOutput ¶
type ListModelsOutput struct { Models []model.ModelVersionSummary `json:"models"` NextPage *ListModelsInput `json:"nextPage"` }
type ListProjectsFilterField ¶
type ListProjectsFilterField string
ListProjectsFilterField are known field names that can be used when filtering the jobs history
const ( ListProjectsFilterFieldSearch ListProjectsFilterField = "search" ListProjectsFilterFieldStatus ListProjectsFilterField = "status" )
type ListProjectsInput ¶
type ListProjectsInput struct {
Paging PagingInput
}
func (*ListProjectsInput) WithFilter ¶
func (i *ListProjectsInput) WithFilter(field ListProjectsFilterField, value string) *ListProjectsInput
func (*ListProjectsInput) WithFilterAnd ¶
func (i *ListProjectsInput) WithFilterAnd(field ListProjectsFilterField, values ...string) *ListProjectsInput
func (*ListProjectsInput) WithFilterOr ¶
func (i *ListProjectsInput) WithFilterOr(field ListProjectsFilterField, values ...string) *ListProjectsInput
func (*ListProjectsInput) WithPaging ¶
func (i *ListProjectsInput) WithPaging(perPage int, page int) *ListProjectsInput
type ListProjectsOutput ¶
type ListProjectsOutput struct { Projects []model.AccountingProject `json:"projects"` NextPage *ListProjectsInput `json:"nextPage"` }
type ModelsClient ¶
type ModelsClient interface { // ListModels lists all models. This supports paging and filtering. ListModels(ctx context.Context, input *ListModelsInput) (*ListModelsOutput, error) // GetLatestModels returns all of the recent models for your team GetLatestModels(ctx context.Context) (*GetLatestModelsOutput, error) // GetMinimumEngines reads the engine configuration values GetMinimumEngines(ctx context.Context) (*GetMinimumEnginesOutput, error) // UpdateModelProcessingEngines updates the engine configuration values UpdateModelProcessingEngines(ctx context.Context, input *UpdateModelProcessingEnginesInput) (*UpdateModelProcessingEnginesOutput, error) // GetModelDetails reads the details of a model GetModelDetails(ctx context.Context, input *GetModelDetailsInput) (*GetModelDetailsOutput, error) // GetModelDetailsByName reads details of a model that matches the provided name GetModelDetailsByName(ctx context.Context, input *GetModelDetailsByNameInput) (*GetModelDetailsOutput, error) // ListModelVersions lists all versions of a model. This supports paging and filtering. ListModelVersions(ctx context.Context, input *ListModelVersionsInput) (*ListModelVersionsOutput, error) // GetRelatedModels will return all models that are related to the given model. GetRelatedModels(ctx context.Context, input *GetRelatedModelsInput) (*GetRelatedModelsOutput, error) // GetModelVersionDetails reads the details of a specific version of a model. GetModelVersionDetails(ctx context.Context, input *GetModelVersionDetailsInput) (*GetModelVersionDetailsOutput, error) // GetModelVersionSampleInput gets a simple input for the provided model version. GetModelVersionSampleInput(ctx context.Context, input *GetModelVersionSampleInputInput) (*GetModelVersionSampleInputOutput, error) // GetModelVersionSampleOutput gets a simple output for the provided model version. GetModelVersionSampleOutput(ctx context.Context, input *GetModelVersionSampleOutputInput) (*GetModelVersionSampleOutputOutput, error) // GetTags returns all tags GetTags(ctx context.Context) (*GetTagsOutput, error) // GetTagModels returns models that match the provided tags GetTagModels(ctx context.Context, input *GetTagModelsInput) (*GetTagModelsOutput, error) }
type ModelsClientFake ¶
type ModelsClientFake struct { ListModelsFunc func(ctx context.Context, input *ListModelsInput) (*ListModelsOutput, error) GetLatestModelsFunc func(ctx context.Context) (*GetLatestModelsOutput, error) GetMinimumEnginesFunc func(ctx context.Context) (*GetMinimumEnginesOutput, error) UpdateModelProcessingEnginesFunc func(ctx context.Context, input *UpdateModelProcessingEnginesInput) (*UpdateModelProcessingEnginesOutput, error) GetModelDetailsFunc func(ctx context.Context, input *GetModelDetailsInput) (*GetModelDetailsOutput, error) GetModelDetailsByNameFunc func(ctx context.Context, input *GetModelDetailsByNameInput) (*GetModelDetailsOutput, error) ListModelVersionsFunc func(ctx context.Context, input *ListModelVersionsInput) (*ListModelVersionsOutput, error) GetRelatedModelsFunc func(ctx context.Context, input *GetRelatedModelsInput) (*GetRelatedModelsOutput, error) GetModelVersionDetailsFunc func(ctx context.Context, input *GetModelVersionDetailsInput) (*GetModelVersionDetailsOutput, error) GetModelVersionSampleInputFunc func(ctx context.Context, input *GetModelVersionSampleInputInput) (*GetModelVersionSampleInputOutput, error) GetModelVersionSampleOutputFunc func(ctx context.Context, input *GetModelVersionSampleOutputInput) (*GetModelVersionSampleOutputOutput, error) GetTagsFunc func(ctx context.Context) (*GetTagsOutput, error) GetTagModelsFunc func(ctx context.Context, input *GetTagModelsInput) (*GetTagModelsOutput, error) }
ModelsClientFake is meant to help in mocking the ModelsClient interface easily for unit testing.
func (*ModelsClientFake) GetLatestModels ¶
func (c *ModelsClientFake) GetLatestModels(ctx context.Context) (*GetLatestModelsOutput, error)
func (*ModelsClientFake) GetMinimumEngines ¶
func (c *ModelsClientFake) GetMinimumEngines(ctx context.Context) (*GetMinimumEnginesOutput, error)
func (*ModelsClientFake) GetModelDetails ¶
func (c *ModelsClientFake) GetModelDetails(ctx context.Context, input *GetModelDetailsInput) (*GetModelDetailsOutput, error)
func (*ModelsClientFake) GetModelDetailsByName ¶
func (c *ModelsClientFake) GetModelDetailsByName(ctx context.Context, input *GetModelDetailsByNameInput) (*GetModelDetailsOutput, error)
func (*ModelsClientFake) GetModelVersionDetails ¶
func (c *ModelsClientFake) GetModelVersionDetails(ctx context.Context, input *GetModelVersionDetailsInput) (*GetModelVersionDetailsOutput, error)
func (*ModelsClientFake) GetModelVersionSampleInput ¶
func (c *ModelsClientFake) GetModelVersionSampleInput(ctx context.Context, input *GetModelVersionSampleInputInput) (*GetModelVersionSampleInputOutput, error)
func (*ModelsClientFake) GetModelVersionSampleOutput ¶
func (c *ModelsClientFake) GetModelVersionSampleOutput(ctx context.Context, input *GetModelVersionSampleOutputInput) (*GetModelVersionSampleOutputOutput, error)
func (*ModelsClientFake) GetRelatedModels ¶
func (c *ModelsClientFake) GetRelatedModels(ctx context.Context, input *GetRelatedModelsInput) (*GetRelatedModelsOutput, error)
func (*ModelsClientFake) GetTagModels ¶
func (c *ModelsClientFake) GetTagModels(ctx context.Context, input *GetTagModelsInput) (*GetTagModelsOutput, error)
func (*ModelsClientFake) GetTags ¶
func (c *ModelsClientFake) GetTags(ctx context.Context) (*GetTagsOutput, error)
func (*ModelsClientFake) ListModelVersions ¶
func (c *ModelsClientFake) ListModelVersions(ctx context.Context, input *ListModelVersionsInput) (*ListModelVersionsOutput, error)
func (*ModelsClientFake) ListModels ¶
func (c *ModelsClientFake) ListModels(ctx context.Context, input *ListModelsInput) (*ListModelsOutput, error)
func (*ModelsClientFake) UpdateModelProcessingEngines ¶
func (c *ModelsClientFake) UpdateModelProcessingEngines(ctx context.Context, input *UpdateModelProcessingEnginesInput) (*UpdateModelProcessingEnginesOutput, error)
type ModzyHTTPError ¶
type ModzyHTTPError struct { StatusCode int `json:"statusCode"` Status string `json:"status"` Message string `json:"message"` ReportErrorURL string `json:"reportErrorUrl"` }
ModzyHTTPError contains additional error information as returned by the http API
func (*ModzyHTTPError) Cause ¶
func (m *ModzyHTTPError) Cause() error
func (*ModzyHTTPError) Error ¶
func (m *ModzyHTTPError) Error() string
type PagingInput ¶
type PagingInput struct { PerPage int Page int SortDirection SortDirection SortBy []string Filters []Filter }
PagingInput -
func NewPaging ¶
func NewPaging(perPage int, page int) PagingInput
NewPaging creates a PagingInput which allows you to set the paging, sorting and filtering information for a List request.
func (PagingInput) Next ¶
func (p PagingInput) Next() PagingInput
func (PagingInput) WithFilter ¶
func (p PagingInput) WithFilter(field string, value string) PagingInput
WithFilter allows adding a filter to the paging information. Consider using the `And` and `Or` function helpers for situations where you need more complex filtering.
func (PagingInput) WithFilterAnd ¶
func (p PagingInput) WithFilterAnd(field string, values ...string) PagingInput
WithFilterAnd will create a paging filter that will filter for each value provided
func (PagingInput) WithFilterOr ¶
func (p PagingInput) WithFilterOr(field string, values ...string) PagingInput
WithFilterOr will create a paging filter that will filter for any value provided
func (PagingInput) WithSort ¶
func (p PagingInput) WithSort(direction SortDirection, by ...string) PagingInput
type PrometheusMetricType ¶
type PrometheusMetricType string
const ( // PrometheusMetricTypeCPURequest - The number of cores requested by a container PrometheusMetricTypeCPURequest PrometheusMetricType = "cpu-requested" // PrometheusMetricTypeCPUAvailable - The cluster’s total number of available CPU cores. PrometheusMetricTypeCPUAvailable PrometheusMetricType = "cpu-available" // PrometheusMetricTypeCPUUsed - The total amount of “system” time + the total amount of “user” time PrometheusMetricTypeCPUUsed PrometheusMetricType = "cpu-used" // PrometheusMetricTypeMemoryRequested - The number of memory bytes requested by a container PrometheusMetricTypeMemoryRequested PrometheusMetricType = "memory-requested" // PrometheusMetricTypeMemoryAvailable - A node’s total allocatable memory bytes PrometheusMetricTypeMemoryAvailable PrometheusMetricType = "memory-available" // PrometheusMetricTypeMemoryUsed - The current memory usage in bytes, it includes all memory regardless of when it was accessed PrometheusMetricTypeMemoryUsed PrometheusMetricType = "memory-used" // PrometheusMetricTypeCPUOverallUsage - cpu-used / cpu-available PrometheusMetricTypeCPUOverallUsage PrometheusMetricType = "cpu-overall-usage" // PrometheusMetricTypeMemoryOverallUsage - memory-used / memory-available PrometheusMetricTypeMemoryOverallUsage PrometheusMetricType = "memory-overall-usage" // PrometheusMetricTypeCPUCurrentUsage - cpu-requested / cpu-available PrometheusMetricTypeCPUCurrentUsage PrometheusMetricType = "cpu-current-usage" )
type PrometheusValue ¶
type ResourcesClient ¶
type ResourcesClient interface { // GetProcessingModels will get information about the model resources being used GetProcessingModels(ctx context.Context) (*GetProcessingModelsOutput, error) }
type ResourcesClientFake ¶
type ResourcesClientFake struct {
GetProcessingModelsFunc func(ctx context.Context) (*GetProcessingModelsOutput, error)
}
ResourcesClientFake is meant to help in mocking the ResourcesClient interface easily for unit testing.
func (*ResourcesClientFake) GetProcessingModels ¶
func (c *ResourcesClientFake) GetProcessingModels(ctx context.Context) (*GetProcessingModelsOutput, error)
type S3InputItem ¶
type S3InputItem map[string]S3Inputable
type S3Inputable ¶
type S3Inputable func() (*S3KeyDefinition, error)
S3Inputable is a data input that can be provided when using Jobs().SubmitJobS3(...).
Provided implementations of this function are:
S3Input
func S3Input ¶
func S3Input(bucket string, key string) S3Inputable
type S3KeyDefinition ¶
type SortDirection ¶
type SortDirection string
const ( SortDirectionAscending SortDirection = "ASC" SortDirectionDescending SortDirection = "DESC" )
type SubmitJobEmbeddedInput ¶
type SubmitJobEmbeddedOutput ¶
type SubmitJobEmbeddedOutput = SubmitJobOutput
type SubmitJobFileInput ¶
type SubmitJobFileInput struct { ModelIdentifier string ModelVersion string Explain bool Timeout time.Duration // ChunkSize (in bytes) is optional -- if not provided it will use the configured MaximumChunkSize. // If provided it will be limited to the configured maximum; ChunkSize int Inputs map[string]FileInputItem }
type SubmitJobFileOutput ¶
type SubmitJobFileOutput = SubmitJobOutput
type SubmitJobJDBCInput ¶
type SubmitJobJDBCOutput ¶
type SubmitJobJDBCOutput = SubmitJobOutput
type SubmitJobOutput ¶
type SubmitJobOutput struct { Response model.SubmitJobResponse JobActions }
type SubmitJobS3Input ¶
type SubmitJobS3Output ¶
type SubmitJobS3Output = SubmitJobOutput
type SubmitJobTextInput ¶
type SubmitJobTextOutput ¶
type SubmitJobTextOutput = SubmitJobOutput
type TextInputItem ¶
type URIEncodable ¶
URIEncodable is a data input that can be provided when using Jobs().SubmitJobEmbedded(...).
Provided implementations of this function are:
(already encoded values) URIEncodedReader URIEncodedString URIEncodedFile (values to be URI encoded) URIEncodeReader URIEncodeString URIEncodeString URIEncodeFile
func URIEncodeFile ¶
func URIEncodeFile(filename string, mimeType string) URIEncodable
func URIEncodeReader ¶
func URIEncodeReader(notEncodedReader io.Reader, mimeType string) URIEncodable
func URIEncodeString ¶
func URIEncodeString(notEncodedString string, mimeType string) URIEncodable
func URIEncodedFile ¶
func URIEncodedFile(alreadyEncodedFilename string) URIEncodable
func URIEncodedReader ¶
func URIEncodedReader(alreadyEncoded io.Reader) URIEncodable
func URIEncodedString ¶
func URIEncodedString(alreadyEncoded string) URIEncodable
type UpdateModelProcessingEnginesOutput ¶
type UpdateModelProcessingEnginesOutput struct {
Details model.ModelVersionDetails `json:"details"`
}
type WaitForJobCompletionInput ¶
type WaitForJobCompletionInput GetJobDetailsInput
Source Files
¶
- accounting_client.go
- accounting_client_fake.go
- accounting_params.go
- client.go
- client_fake.go
- constants.go
- dashboard_client.go
- dashboard_client_fake.go
- dashboard_params.go
- errors.go
- filesystem.go
- input_file.go
- input_s3.go
- input_uri.go
- job_actions.go
- jobs_client.go
- jobs_client_fake.go
- jobs_params.go
- models_client.go
- models_client_fake.go
- models_params.go
- options.go
- overview.go
- pagination.go
- requestor.go
- resources_client.go
- resources_client_fake.go
- resources_params.go