package module
Version: v0.0.7 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 22 Imported by: 1


Modzy Golang SDK

Modzy Logo

Modzy's Golang SDK queries models, submits inference jobs, and returns results directly to your editor.

GitHub contributors GitHub last commit GitHub Release Date Go Report Card

The job lifecycle | API Keys | Samples | Documentation


Add the dependency

go get -u
Get your API key

API keys are security credentials required to perform API requests to Modzy. Our API keys are composed of an ID that is split by a dot into two parts: a public and private part.

The public part is the API keys' visible part only used to identify the key and by itself, it’s unable to perform API requests.

The private part is the public part's complement and it’s required to perform API requests. Since it’s not stored on Modzy’s servers, it cannot be recovered. Make sure to save it securely. If lost, you can replace the API key.

Find your API key in your user profile. To get your full API key click on "Get key":

get key


Once you have a model and version identified, get authenticated with your API key.

client := modzy.NewClient("").WithAPIKey("API Key")

Basic usage

Browse models

Modzy’s Marketplace includes pre-trained and re-trainable AI models from industry-leading machine learning companies, accelerating the process from data to value.

The Model service drives the Marketplace and can be integrated with other applications, scripts, and systems. It provides routes to list, search, and filter model and model-version details.

List models:

out, err := client.Models().ListModels(ctx, input)
if err != nil {
	return err
for _, modelSummary := range out.Models {
	fmt.Println("Model: ", modelSummary)

Tags help categorize and filter models. They make model browsing easier.

List tags:

out, err := client.Models().GetTags(ctx)
if err != nil {
    return err
for _, tag := range out.Tags {
    fmt.Println("Tag: ", tag)

List models by tag:

out, err := client.Models().GetTagModels(ctx)
if err != nil {
    return err
for _, model := range out.Models {
    fmt.Println("Model: ", model)
Get a model's details

Models accept specific input file MIME types. Some models may require multiple input file types to run data accordingly. In this sample, we use a model that requires text/plain.

Models require inputs to have a specific input name declared in the job request. This name can be found in the model’s details. In this sample, we use a model that requires input.txt.

Additionally, users can set their own input names. When multiple input items are processed in a job, these names are helpful to identify and get each input’s results. In this sample, we use a model that requires input-1 and input-2.

Get a model's details:

out, err := client.Models().GetModelDetails(ctx, &modzy.GetModelDetailsInput{ModelID: "ed542963de"})
if err != nil {
    return err
fmt.Println("Model: ", out.Details)

Model specific sample requests are available in the version details and in the Model Details page.

Get version details:

out, err := client.Models().GetModelVersionDetails(ctx, &modzy.GetModelVersionDetailsInput{ModelID: "ed542963de", Version: "0.0.27"})
if err != nil {
    return err
// then you'll get all the details about the specific model version
fmt.Printf("ModelVersion Details %s\n", out.Details)
// Probably the more interesting are the ones related with the inputs and outputs of the model
fmt.Println("  inputs:")
for _, input := range out.Details.Inputs {
        "    key %s, type %s, description: %s\n", input.Name, input.AcceptedMediaTypes, input.Description
fmt.Println("  outputs:")
for _, output := range out.Details.Outputs {
        "    key %s, type %s, description: %s\n", output.Name, output.MediaType, output.Description
Submit a job and get results

A job is the process that sends data to a model, sets the model to run the data, and returns results.

Modzy supports several input types such as text, embedded for Base64 strings, aws-s3 and aws-s3-folder for inputs hosted in buckets, and jdbc for inputs stored in databases. In this sample, we use text.

Here are samples to submit jobs with embedded, aws-s3, aws-s3-folder, and jdbc input types.

Submit a job with the model, version, and input items:

submitResponse, err := client.Jobs().SubmitJobText(ctx, &modzy.SubmitJobTextInput{
        "my-input": {
            "input.txt": "Modzy is great!"

Hold until the inference is complete and results become available:

jobDetails, err := submitResponse.WaitForCompletion(ctx, 20*time.Second)

Get the results:

Results are available per input item and can be identified with the name provided for each input item upon job request. You can also add an input name to the route and limit the results to any given input item.

Jobs requested for multiple input items may have partial results available prior to job completion.

results, err := jobDetails.GetResults(ctx)
Fetch errors

Errors may arise for different reasons. Fetch errors to know what is their cause and how to fix them.

Error Description
ModzyHTTPError Wrapper for different errors, check code, message, url attributes.

Submitting jobs:

submitResponse, err := client.Jobs().SubmitJobText(ctx, &modzy.SubmitJobTextInput{
		"my-input": {
			"input.txt": "Modzy is great!"
if err != nil {
    log.Fatalf("The job submission fails with code %s and message %s", err.Status, err.Message)


Modzy supports batch processing, explainability, and model drift detection.


Here is a list of Modzy APIs. To see all the APIs, check our Documentation.

Feature Code Api route
List models client.Models().ListModels() api/models
Get model details client.Models().GetModelDetails() api/models/:model-id
List models by name client.Models().GetModelDetailsByName() api/models
List models by tags client.Models().GetTagsModels() api/models/tags/:tag-id
Get related models client.Models().GetRelatedModels() api/models/:model-id/related-models
Get a model's versions client.Models().ListModelVersions() api/models/:model-id/versions
Get version details client.Models().GetModelVersionsDetails() api/models/:model-id/versions/:version-id
List tags client.Models().ListTags() api/models/tags
Submit a Job (Text) client.Jobs().SubmitJobText() api/jobs
Submit a Job (Embedded) client.Jobs().SubmitJobEmbedded() api/jobs
Submit a Job (AWS S3) client.Jobs().SubmitJobS3() api/jobs
Submit a Job (JDBC) client.Jobs().SubmitJobJDBC() api/jobs
Cancel a job lient.Jobs().CancelJob() api/jobs/:job-id
Hold until inference is complete client.Jobs().WaitForJobCompletion() api/jobs/:job-id
Get job details client.Jobs().GetJobDetails() api/jobs/:job-id
Get results client.Jobs().getJobResults() api/results/:job-id
List the job history client.Jobs().GetJobsHistory() api/jobs/history


Check out our samples for details on specific use cases.

To run samples:

Set the base url and api key in each sample file:

// TODO: set the base url of modzy api and you api key
client := modzy.NewClient("").WithAPIKey("API Key")

Or follow the instructions here to learn more.

And then, you can:

$ go run samples/models/main.go


We are happy to receive contributions from all of our users. Check out our contributing file to learn more.

Code of conduct

Contributor Covenant



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("").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:


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!")




View Source
const (
	JobStatusSubmitted  = "SUBMITTED"
	JobStatusInProgress = "IN_PROGRESS"
	JobStatusCompleted  = "COMPLETED"
	JobStatusCanceled   = "CANCELED"
	JobStatusTimedOut   = "TIMEDOUT"
	JobStatusOpen       = "OPEN"

JobStatus constants for known statuses

View Source
const (
	DefaultPageSize = 10


View Source
var (
	ErrNotImplemented = fmt.Errorf("method not implemented")
	ErrBadRequest     = fmt.Errorf("the API doesn’t understand the request. Something is missing")
	ErrUnauthorized   = fmt.Errorf("the API key is missing or misspelled")
	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

View Source
var AppFs = afero.NewOsFs()

AppFs is exposed for possible mocking


This section is empty.


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 (*AccountingClientFake) GetProjectDetails

func (*AccountingClientFake) HasEntitlement

func (c *AccountingClientFake) HasEntitlement(ctx context.Context, entitlement string) (bool, error)

func (*AccountingClientFake) ListAccountingUsers

func (*AccountingClientFake) ListProjects

type AlertSummary

type AlertSummary struct {
	Type  AlertType `json:"type"`
	Count int       `json:"count"`

type AlertType

type AlertType string
const (
	AlertTypeJobStuck        AlertType = "JOB_STUCK"
	AlertTypeModelExpiration AlertType = "MODEL_EXPIRATION"

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)
package main

import (

	modzy ""

func main() {
	ctx := context.TODO()
	client := modzy.NewClient("").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)

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 (*DashboardClientFake) GetActiveUsers

func (*DashboardClientFake) GetAlertDetails

func (*DashboardClientFake) GetAlerts

func (*DashboardClientFake) GetDataProcessed

func (*DashboardClientFake) GetPredictionsMade

func (*DashboardClientFake) GetPrometheusMetric

type EmbeddedInputItem

type EmbeddedInputItem map[string]URIEncodable

type FileInputEncodable

type FileInputEncodable func() (io.Reader, error)

FileInputEncodable is a data input that can be provided when using Jobs().SubmitJobFile(...).

Provided implementations of this function are:


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 GetActiveModelsInput struct {
	BeginDate       model.ModzyDate
	EndDate         model.ModzyDate
	UserIdentifier  string
	AccessKeyPrefix string
	ModelIdentifier string
	TeamIdentifier  string

type GetActiveModelsOutput

type GetActiveModelsOutput struct {
	Models []model.ActiveModelSummary `json:"models"`

type GetActiveUsersInput

type GetActiveUsersInput struct {
	BeginDate       model.ModzyDate
	EndDate         model.ModzyDate
	UserIdentifier  string
	AccessKeyPrefix string
	ModelIdentifier string
	TeamIdentifier  string

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 GetAlertsInput

type GetAlertsInput struct{}

GetAlertsInput -

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 GetLicenseOutput struct {
	License model.License `json:"license"`

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

type GetModelVersionDetailsInput struct {
	ModelID string
	Version string

GetModelVersionDetailsInput -

type GetModelVersionDetailsOutput

type GetModelVersionDetailsOutput struct {
	Details model.ModelVersionDetails `json:"details"`

GetModelVersionDetailsOutput -

type GetModelVersionSampleInputInput

type GetModelVersionSampleInputInput struct {
	ModelID string
	Version string

type GetModelVersionSampleInputOutput

type GetModelVersionSampleInputOutput struct {
	Sample string `json:"sample"`

type GetModelVersionSampleOutputInput

type GetModelVersionSampleOutputInput struct {
	ModelID string
	Version string

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 GetTagsOutput struct {
	Tags []model.ModelTag `json:"tags"`

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 (*ListAccountingUsersInput) WithFilterAnd

func (*ListAccountingUsersInput) WithFilterOr

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 (*ListJobsHistoryInput) WithFilterAnd

func (i *ListJobsHistoryInput) WithFilterAnd(field ListJobsHistoryFilterField, values ...string) *ListJobsHistoryInput

func (*ListJobsHistoryInput) WithFilterOr

func (*ListJobsHistoryInput) WithPaging

func (i *ListJobsHistoryInput) WithPaging(perPage int, page int) *ListJobsHistoryInput

func (*ListJobsHistoryInput) WithSort

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 (*ListModelVersionsInput) WithFilterAnd

func (*ListModelVersionsInput) WithFilterOr

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 (*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 (*ModelsClientFake) GetModelDetailsByName

func (c *ModelsClientFake) GetModelDetailsByName(ctx context.Context, input *GetModelDetailsByNameInput) (*GetModelDetailsOutput, error)

func (*ModelsClientFake) GetModelVersionDetails

func (*ModelsClientFake) GetModelVersionSampleInput

func (*ModelsClientFake) GetModelVersionSampleOutput

func (*ModelsClientFake) GetRelatedModels

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 (*ModelsClientFake) ListModels

func (c *ModelsClientFake) ListModels(ctx context.Context, input *ListModelsInput) (*ListModelsOutput, error)

func (*ModelsClientFake) UpdateModelProcessingEngines

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 PrometheusValue struct {
	Time  time.Time `json:"time"`
	Value string    `json:"value"`

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:


func S3Input

func S3Input(bucket string, key string) S3Inputable

type S3KeyDefinition

type S3KeyDefinition struct {
	Bucket string
	Key    string

type SortDirection

type SortDirection string
const (
	SortDirectionAscending  SortDirection = "ASC"
	SortDirectionDescending SortDirection = "DESC"

type SubmitJobEmbeddedInput

type SubmitJobEmbeddedInput struct {
	ModelIdentifier string
	ModelVersion    string
	Explain         bool
	Timeout         time.Duration
	Inputs          map[string]EmbeddedInputItem

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 SubmitJobJDBCInput struct {
	ModelIdentifier   string
	ModelVersion      string
	Explain           bool
	Timeout           time.Duration
	JDBCConnectionURL string
	DatabaseUsername  string
	DatabasePassword  string
	Query             string

type SubmitJobJDBCOutput

type SubmitJobJDBCOutput = SubmitJobOutput

type SubmitJobOutput

type SubmitJobOutput struct {
	Response model.SubmitJobResponse

type SubmitJobS3Input

type SubmitJobS3Input struct {
	ModelIdentifier    string
	ModelVersion       string
	Explain            bool
	Timeout            time.Duration
	AWSAccessKeyID     string
	AWSSecretAccessKey string
	AWSRegion          string
	Inputs             map[string]S3InputItem

type SubmitJobS3Output

type SubmitJobS3Output = SubmitJobOutput

type SubmitJobTextInput

type SubmitJobTextInput struct {
	ModelIdentifier string
	ModelVersion    string
	Explain         bool
	Timeout         time.Duration
	Inputs          map[string]TextInputItem

type SubmitJobTextOutput

type SubmitJobTextOutput = SubmitJobOutput

type TextInputItem

type TextInputItem map[string]string

type URIEncodable

type URIEncodable func() (io.Reader, error)

URIEncodable is a data input that can be provided when using Jobs().SubmitJobEmbedded(...).

Provided implementations of this function are:

(already encoded values)

(values to be URI encoded)

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 UpdateModelProcessingEnginesInput

type UpdateModelProcessingEnginesInput struct {
	ModelID                 string
	Version                 string
	MinimumParallelCapacity int `json:"minimumParallelCapacity"`
	MaximumParallelCapacity int `json:"maximumParallelCapacity"`

type UpdateModelProcessingEnginesOutput

type UpdateModelProcessingEnginesOutput struct {
	Details model.ModelVersionDetails `json:"details"`

type WaitForJobCompletionInput

type WaitForJobCompletionInput GetJobDetailsInput


Path Synopsis
main package provides code examples that utilize the Modzy sdk.
main package provides code examples that utilize the Modzy sdk.
Package model contains types as defined by the http api.
Package model contains types as defined by the http api.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL