client

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const TokenHeaderName = "cookie"

TokenHeaderName defines the cookie token

Variables

This section is empty.

Functions

func AuthWithMulti

func AuthWithMulti(writers ...runtime.ClientAuthInfoWriter) runtime.ClientAuthInfoWriter

AuthWithMulti writes authentication info to a request

func AuthWithToken

func AuthWithToken(token string) runtime.ClientAuthInfoWriter

AuthWithToken authenticates with a token

func AuthWithUserPassword

func AuthWithUserPassword(username string, password string) runtime.ClientAuthInfoWriter

AuthWithUserPassword authenticates with username and password

func DefaultHTTPClient added in v0.1.15

func DefaultHTTPClient(host, basePath string) *swaggerclient.Runtime

DefaultHTTPClient Creates a default HTTP transport for all clients

Types

type APIsClient added in v0.1.17

type APIsClient interface {
	// APIs
	CreateAPI(ctx context.Context, organizationID string, api *v1.API) (*v1.API, error)
	DeleteAPI(ctx context.Context, organizationID string, apiName string) (*v1.API, error)
	UpdateAPI(ctx context.Context, organizationID string, api *v1.API) (*v1.API, error)
	GetAPI(ctx context.Context, organizationID string, apiName string) (*v1.API, error)
	ListAPIs(ctx context.Context, organizationID string) ([]v1.API, error)
}

APIsClient defines the api client interface

type DefaultAPIsClient added in v0.1.17

type DefaultAPIsClient struct {
	// contains filtered or unexported fields
}

DefaultAPIsClient defines the default APIs client

func NewAPIsClient added in v0.1.17

func NewAPIsClient(host string, auth runtime.ClientAuthInfoWriter, organizationID string) *DefaultAPIsClient

NewAPIsClient is used to create a new APIs client

func (*DefaultAPIsClient) CreateAPI added in v0.1.17

func (c *DefaultAPIsClient) CreateAPI(ctx context.Context, organizationID string, api *v1.API) (*v1.API, error)

CreateAPI creates new api

func (*DefaultAPIsClient) DeleteAPI added in v0.1.17

func (c *DefaultAPIsClient) DeleteAPI(ctx context.Context, organizationID string, apiName string) (*v1.API, error)

DeleteAPI deletes an api

func (*DefaultAPIsClient) GetAPI added in v0.1.17

func (c *DefaultAPIsClient) GetAPI(ctx context.Context, organizationID string, apiName string) (*v1.API, error)

GetAPI retrieves an api

func (*DefaultAPIsClient) ListAPIs added in v0.1.17

func (c *DefaultAPIsClient) ListAPIs(ctx context.Context, organizationID string) ([]v1.API, error)

ListAPIs returns a list of APIs

func (*DefaultAPIsClient) UpdateAPI added in v0.1.17

func (c *DefaultAPIsClient) UpdateAPI(ctx context.Context, organizationID string, api *v1.API) (*v1.API, error)

UpdateAPI updates an api

type DefaultEventsClient added in v0.1.17

type DefaultEventsClient struct {
	// contains filtered or unexported fields
}

DefaultEventsClient defines the default client for events API

func NewEventsClient added in v0.1.17

func NewEventsClient(host string, auth runtime.ClientAuthInfoWriter, organizationID string) *DefaultEventsClient

NewEventsClient is used to create a new subscriptions client

func (*DefaultEventsClient) CreateEventDriver added in v0.1.17

func (c *DefaultEventsClient) CreateEventDriver(ctx context.Context, organizationID string, driver *v1.EventDriver) (*v1.EventDriver, error)

CreateEventDriver creates and adds a new event driver

func (*DefaultEventsClient) CreateEventDriverType added in v0.1.17

func (c *DefaultEventsClient) CreateEventDriverType(ctx context.Context, organizationID string, driverType *v1.EventDriverType) (*v1.EventDriverType, error)

CreateEventDriverType creates and adds a new subscription

func (*DefaultEventsClient) CreateSubscription added in v0.1.17

func (c *DefaultEventsClient) CreateSubscription(ctx context.Context, organizationID string, subscription *v1.Subscription) (*v1.Subscription, error)

CreateSubscription creates and adds a new subscription

func (*DefaultEventsClient) DeleteEventDriver added in v0.1.17

func (c *DefaultEventsClient) DeleteEventDriver(ctx context.Context, organizationID string, driverName string) (*v1.EventDriver, error)

DeleteEventDriver deletes a driver

func (*DefaultEventsClient) DeleteEventDriverType added in v0.1.17

func (c *DefaultEventsClient) DeleteEventDriverType(ctx context.Context, organizationID string, driverTypeName string) (*v1.EventDriverType, error)

DeleteEventDriverType deletes a driver

func (*DefaultEventsClient) DeleteSubscription added in v0.1.17

func (c *DefaultEventsClient) DeleteSubscription(ctx context.Context, organizationID string, subscriptionName string) (*v1.Subscription, error)

DeleteSubscription deletes a subscription

func (*DefaultEventsClient) EmitEvent added in v0.1.17

func (c *DefaultEventsClient) EmitEvent(ctx context.Context, organizationID string, emission *v1.Emission) (*v1.Emission, error)

EmitEvent emits an event

func (*DefaultEventsClient) GetEventDriver added in v0.1.17

func (c *DefaultEventsClient) GetEventDriver(ctx context.Context, organizationID string, driverName string) (*v1.EventDriver, error)

GetEventDriver gets a driver by name

func (*DefaultEventsClient) GetEventDriverType added in v0.1.17

func (c *DefaultEventsClient) GetEventDriverType(ctx context.Context, organizationID string, driverTypeName string) (*v1.EventDriverType, error)

GetEventDriverType gets a driver by name

func (*DefaultEventsClient) GetSubscription added in v0.1.17

func (c *DefaultEventsClient) GetSubscription(ctx context.Context, organizationID string, subscriptionName string) (*v1.Subscription, error)

GetSubscription gets a subscription by name

func (*DefaultEventsClient) ListEventDriverTypes added in v0.1.17

func (c *DefaultEventsClient) ListEventDriverTypes(ctx context.Context, organizationID string) ([]v1.EventDriverType, error)

ListEventDriverTypes lists all drivers

func (*DefaultEventsClient) ListEventDrivers added in v0.1.17

func (c *DefaultEventsClient) ListEventDrivers(ctx context.Context, organizationID string) ([]v1.EventDriver, error)

ListEventDrivers lists all drivers

func (*DefaultEventsClient) ListSubscriptions added in v0.1.17

func (c *DefaultEventsClient) ListSubscriptions(ctx context.Context, organizationID string) ([]v1.Subscription, error)

ListSubscriptions lists all subscriptions

func (*DefaultEventsClient) UpdateEventDriver added in v0.1.17

func (c *DefaultEventsClient) UpdateEventDriver(ctx context.Context, organizationID string, driver *v1.EventDriver) (*v1.EventDriver, error)

UpdateEventDriver updates a specific driver

func (*DefaultEventsClient) UpdateEventDriverType added in v0.1.17

func (c *DefaultEventsClient) UpdateEventDriverType(ctx context.Context, organizationID string, driverType *v1.EventDriverType) (*v1.EventDriverType, error)

UpdateEventDriverType updates a specific driver

func (*DefaultEventsClient) UpdateSubscription added in v0.1.17

func (c *DefaultEventsClient) UpdateSubscription(ctx context.Context, organizationID string, subscription *v1.Subscription) (*v1.Subscription, error)

UpdateSubscription updates a specific subscription

type DefaultFunctionsClient

type DefaultFunctionsClient struct {
	// contains filtered or unexported fields
}

DefaultFunctionsClient defines the default functions client

func NewFunctionsClient

func NewFunctionsClient(host string, auth runtime.ClientAuthInfoWriter, organizationID string) *DefaultFunctionsClient

NewFunctionsClient is used to create a new functions client

func (*DefaultFunctionsClient) CreateFunction

func (c *DefaultFunctionsClient) CreateFunction(ctx context.Context, organizationID string, function *v1.Function) (*v1.Function, error)

CreateFunction creates and adds a new function

func (*DefaultFunctionsClient) DeleteFunction

func (c *DefaultFunctionsClient) DeleteFunction(ctx context.Context, organizationID string, functionName string) (*v1.Function, error)

DeleteFunction deletes a function

func (*DefaultFunctionsClient) GetFunction

func (c *DefaultFunctionsClient) GetFunction(ctx context.Context, organizationID string, functionName string) (*v1.Function, error)

GetFunction gets a function by name

func (*DefaultFunctionsClient) GetFunctionRun

func (c *DefaultFunctionsClient) GetFunctionRun(ctx context.Context, organizationID string, opts FunctionOpts) (*v1.Run, error)

GetFunctionRun gets the results of a function run

func (*DefaultFunctionsClient) ListFunctions

func (c *DefaultFunctionsClient) ListFunctions(ctx context.Context, organizationID string) ([]v1.Function, error)

ListFunctions lists all functions

func (*DefaultFunctionsClient) ListRuns

func (c *DefaultFunctionsClient) ListRuns(ctx context.Context, organizationID string, opts FunctionOpts) ([]v1.Run, error)

ListRuns lists all the available results from previous function runs filtered by opts

func (*DefaultFunctionsClient) RunFunction

func (c *DefaultFunctionsClient) RunFunction(ctx context.Context, organizationID string, run *v1.Run) (*v1.Run, error)

RunFunction runs a function

func (*DefaultFunctionsClient) UpdateFunction

func (c *DefaultFunctionsClient) UpdateFunction(ctx context.Context, organizationID string, function *v1.Function) (*v1.Function, error)

UpdateFunction updates a specific function

type DefaultIdentityClient added in v0.1.18

type DefaultIdentityClient struct {
	// contains filtered or unexported fields
}

DefaultIdentityClient defines the default client for events API

func NewIdentityClient added in v0.1.18

func NewIdentityClient(host string, auth runtime.ClientAuthInfoWriter, organizationID string) *DefaultIdentityClient

NewIdentityClient is used to create a new subscriptions client

func (*DefaultIdentityClient) CreateOrganization added in v0.1.18

func (c *DefaultIdentityClient) CreateOrganization(ctx context.Context, organizationID string, policy *v1.Organization) (*v1.Organization, error)

CreateOrganization creates new policy

func (*DefaultIdentityClient) CreatePolicy added in v0.1.18

func (c *DefaultIdentityClient) CreatePolicy(ctx context.Context, organizationID string, policy *v1.Policy) (*v1.Policy, error)

CreatePolicy creates new policy

func (*DefaultIdentityClient) CreateServiceAccount added in v0.1.18

func (c *DefaultIdentityClient) CreateServiceAccount(ctx context.Context, organizationID string, policy *v1.ServiceAccount) (*v1.ServiceAccount, error)

CreateServiceAccount creates new policy

func (*DefaultIdentityClient) DeleteOrganization added in v0.1.18

func (c *DefaultIdentityClient) DeleteOrganization(ctx context.Context, organizationID string, policyName string) (*v1.Organization, error)

DeleteOrganization deletes the policy

func (*DefaultIdentityClient) DeletePolicy added in v0.1.18

func (c *DefaultIdentityClient) DeletePolicy(ctx context.Context, organizationID string, policyName string) (*v1.Policy, error)

DeletePolicy deletes the policy

func (*DefaultIdentityClient) DeleteServiceAccount added in v0.1.18

func (c *DefaultIdentityClient) DeleteServiceAccount(ctx context.Context, organizationID string, policyName string) (*v1.ServiceAccount, error)

DeleteServiceAccount deletes the policy

func (*DefaultIdentityClient) GetOrganization added in v0.1.18

func (c *DefaultIdentityClient) GetOrganization(ctx context.Context, organizationID string, policyName string) (*v1.Organization, error)

GetOrganization deletes the policy

func (*DefaultIdentityClient) GetPolicy added in v0.1.18

func (c *DefaultIdentityClient) GetPolicy(ctx context.Context, organizationID string, policyName string) (*v1.Policy, error)

GetPolicy deletes the policy

func (*DefaultIdentityClient) GetServiceAccount added in v0.1.18

func (c *DefaultIdentityClient) GetServiceAccount(ctx context.Context, organizationID string, policyName string) (*v1.ServiceAccount, error)

GetServiceAccount deletes the policy

func (*DefaultIdentityClient) GetVersion added in v0.1.18

func (c *DefaultIdentityClient) GetVersion(ctx context.Context) (*v1.Version, error)

GetVersion retrievies version from Dispatch

func (*DefaultIdentityClient) Home added in v0.1.18

func (c *DefaultIdentityClient) Home(ctx context.Context, organizationID string) (*v1.Message, error)

Home checks availability of Dispatch

func (*DefaultIdentityClient) ListOrganizations added in v0.1.18

func (c *DefaultIdentityClient) ListOrganizations(ctx context.Context, organizationID string) ([]v1.Organization, error)

ListOrganizations lists all functions

func (*DefaultIdentityClient) ListPolicies added in v0.1.18

func (c *DefaultIdentityClient) ListPolicies(ctx context.Context, organizationID string) ([]v1.Policy, error)

ListPolicies lists all functions

func (*DefaultIdentityClient) ListServiceAccounts added in v0.1.18

func (c *DefaultIdentityClient) ListServiceAccounts(ctx context.Context, organizationID string) ([]v1.ServiceAccount, error)

ListServiceAccounts lists all functions

func (*DefaultIdentityClient) UpdateOrganization added in v0.1.18

func (c *DefaultIdentityClient) UpdateOrganization(ctx context.Context, organizationID string, policy *v1.Organization) (*v1.Organization, error)

UpdateOrganization updates the policy

func (*DefaultIdentityClient) UpdatePolicy added in v0.1.18

func (c *DefaultIdentityClient) UpdatePolicy(ctx context.Context, organizationID string, policy *v1.Policy) (*v1.Policy, error)

UpdatePolicy updates the policy

func (*DefaultIdentityClient) UpdateServiceAccount added in v0.1.18

func (c *DefaultIdentityClient) UpdateServiceAccount(ctx context.Context, organizationID string, policy *v1.ServiceAccount) (*v1.ServiceAccount, error)

UpdateServiceAccount updates the policy

type DefaultImagesClient added in v0.1.15

type DefaultImagesClient struct {
	// contains filtered or unexported fields
}

DefaultImagesClient defines the default images client

func (*DefaultImagesClient) CreateBaseImage added in v0.1.15

func (c *DefaultImagesClient) CreateBaseImage(ctx context.Context, organizationID string, image *v1.BaseImage) (*v1.BaseImage, error)

CreateBaseImage creates new base image

func (*DefaultImagesClient) CreateImage added in v0.1.15

func (c *DefaultImagesClient) CreateImage(ctx context.Context, organizationID string, image *v1.Image) (*v1.Image, error)

CreateImage creates new image

func (*DefaultImagesClient) DeleteBaseImage added in v0.1.15

func (c *DefaultImagesClient) DeleteBaseImage(ctx context.Context, organizationID string, baseImageName string) (*v1.BaseImage, error)

DeleteBaseImage deletes the base image

func (*DefaultImagesClient) DeleteImage added in v0.1.15

func (c *DefaultImagesClient) DeleteImage(ctx context.Context, organizationID string, imageName string) (*v1.Image, error)

DeleteImage deletes an image

func (*DefaultImagesClient) GetBaseImage added in v0.1.15

func (c *DefaultImagesClient) GetBaseImage(ctx context.Context, organizationID string, baseImageName string) (*v1.BaseImage, error)

GetBaseImage retrieves the base image

func (*DefaultImagesClient) GetImage added in v0.1.15

func (c *DefaultImagesClient) GetImage(ctx context.Context, organizationID string, imageName string) (*v1.Image, error)

GetImage retrieves an image

func (*DefaultImagesClient) ListBaseImages added in v0.1.15

func (c *DefaultImagesClient) ListBaseImages(ctx context.Context, organizationID string) ([]v1.BaseImage, error)

ListBaseImages returns a list of base images

func (*DefaultImagesClient) ListImages added in v0.1.15

func (c *DefaultImagesClient) ListImages(ctx context.Context, organizationID string) ([]v1.Image, error)

ListImages returns a list of images

func (*DefaultImagesClient) UpdateBaseImage added in v0.1.15

func (c *DefaultImagesClient) UpdateBaseImage(ctx context.Context, organizationID string, image *v1.BaseImage) (*v1.BaseImage, error)

UpdateBaseImage updates the base image

func (*DefaultImagesClient) UpdateImage added in v0.1.15

func (c *DefaultImagesClient) UpdateImage(ctx context.Context, organizationID string, image *v1.Image) (*v1.Image, error)

UpdateImage updates an image

type DefaultSecretsClient added in v0.1.15

type DefaultSecretsClient struct {
	// contains filtered or unexported fields
}

DefaultSecretsClient defines the default secrets client

func (*DefaultSecretsClient) CreateSecret added in v0.1.15

func (c *DefaultSecretsClient) CreateSecret(ctx context.Context, organizationID string, secret *v1.Secret) (*v1.Secret, error)

CreateSecret creates a secret

func (*DefaultSecretsClient) DeleteSecret added in v0.1.15

func (c *DefaultSecretsClient) DeleteSecret(ctx context.Context, organizationID string, secretName string) error

DeleteSecret deletes a secret

func (*DefaultSecretsClient) GetSecret added in v0.1.15

func (c *DefaultSecretsClient) GetSecret(ctx context.Context, organizationID string, secretName string) (*v1.Secret, error)

GetSecret retrieves a secret

func (*DefaultSecretsClient) ListSecrets added in v0.1.15

func (c *DefaultSecretsClient) ListSecrets(ctx context.Context, organizationID string) ([]v1.Secret, error)

ListSecrets lists secrets

func (*DefaultSecretsClient) UpdateSecret added in v0.1.15

func (c *DefaultSecretsClient) UpdateSecret(ctx context.Context, organizationID string, secret *v1.Secret) (*v1.Secret, error)

UpdateSecret updates a secret

type DefaultServicesClient added in v0.1.15

type DefaultServicesClient struct {
	// contains filtered or unexported fields
}

DefaultServicesClient defines the default services client

func NewServicesClient added in v0.1.15

func NewServicesClient(host string, auth runtime.ClientAuthInfoWriter, organizationID string) *DefaultServicesClient

NewServicesClient is used to create a new serviceInstances client

func (*DefaultServicesClient) CreateServiceInstance added in v0.1.15

func (c *DefaultServicesClient) CreateServiceInstance(ctx context.Context, organizationID string, instance *v1.ServiceInstance) (*v1.ServiceInstance, error)

CreateServiceInstance creates a service instance

func (*DefaultServicesClient) DeleteServiceInstance added in v0.1.15

func (c *DefaultServicesClient) DeleteServiceInstance(ctx context.Context, organizationID string, serviceInstanceName string) error

DeleteServiceInstance deletes a service instance

func (*DefaultServicesClient) GetServiceClass added in v0.1.15

func (c *DefaultServicesClient) GetServiceClass(ctx context.Context, organizationID string, serviceClassName string) (*v1.ServiceClass, error)

GetServiceClass retrieves a service class

func (*DefaultServicesClient) GetServiceInstance added in v0.1.15

func (c *DefaultServicesClient) GetServiceInstance(ctx context.Context, organizationID string, serviceInstanceName string) (*v1.ServiceInstance, error)

GetServiceInstance retrieves a service instance

func (*DefaultServicesClient) ListServiceClasses added in v0.1.15

func (c *DefaultServicesClient) ListServiceClasses(ctx context.Context, organizationID string) ([]v1.ServiceClass, error)

ListServiceClasses lists service classes

func (*DefaultServicesClient) ListServiceInstances added in v0.1.15

func (c *DefaultServicesClient) ListServiceInstances(ctx context.Context, organizationID string) ([]v1.ServiceInstance, error)

ListServiceInstances lists service instances

type Error added in v0.1.21

type Error interface {
	Error() string
	Message() string
	Code() int
}

Error is an interface implemented by all errors declared here.

type ErrorAlreadyExists added in v0.1.17

type ErrorAlreadyExists struct {
	// contains filtered or unexported fields
}

ErrorAlreadyExists represents error when resource already exists on the server

func NewErrorAlreadyExists added in v0.1.18

func NewErrorAlreadyExists(apiError *v1.Error) *ErrorAlreadyExists

NewErrorAlreadyExists creates new instance of ErrorAlreadyExists based on Error Model

func (ErrorAlreadyExists) Code added in v0.1.17

func (b ErrorAlreadyExists) Code() int

func (ErrorAlreadyExists) Error added in v0.1.17

func (b ErrorAlreadyExists) Error() string

func (ErrorAlreadyExists) Message added in v0.1.17

func (b ErrorAlreadyExists) Message() string

type ErrorBadRequest added in v0.1.17

type ErrorBadRequest struct {
	// contains filtered or unexported fields
}

ErrorBadRequest represents client-side request error

func NewErrorBadRequest added in v0.1.18

func NewErrorBadRequest(apiError *v1.Error) *ErrorBadRequest

NewErrorBadRequest creates new instance of ErrorBadRequest based on Error Model

func (ErrorBadRequest) Code added in v0.1.17

func (b ErrorBadRequest) Code() int

func (ErrorBadRequest) Error added in v0.1.17

func (b ErrorBadRequest) Error() string

func (ErrorBadRequest) Message added in v0.1.17

func (b ErrorBadRequest) Message() string

type ErrorForbidden added in v0.1.17

type ErrorForbidden struct {
	// contains filtered or unexported fields
}

ErrorForbidden represents authz error

func NewErrorForbidden added in v0.1.18

func NewErrorForbidden(apiError *v1.Error) *ErrorForbidden

NewErrorForbidden creates new instance of ErrorForbidden based on Error Model

func (ErrorForbidden) Code added in v0.1.17

func (b ErrorForbidden) Code() int

func (ErrorForbidden) Error added in v0.1.17

func (b ErrorForbidden) Error() string

func (ErrorForbidden) Message added in v0.1.17

func (b ErrorForbidden) Message() string

type ErrorFunctionError added in v0.1.18

type ErrorFunctionError struct {
	// contains filtered or unexported fields
}

ErrorFunctionError represents error that happened when executing the function

func NewErrorFunctionError added in v0.1.18

func NewErrorFunctionError(apiError *v1.Error) *ErrorFunctionError

NewErrorFunctionError creates new instance of ErrorFunctionError based on Error Model

func (ErrorFunctionError) Code added in v0.1.18

func (b ErrorFunctionError) Code() int

func (ErrorFunctionError) Error added in v0.1.18

func (b ErrorFunctionError) Error() string

func (ErrorFunctionError) Message added in v0.1.18

func (b ErrorFunctionError) Message() string

type ErrorInvalidInput added in v0.1.18

type ErrorInvalidInput struct {
	// contains filtered or unexported fields
}

ErrorInvalidInput represents error of request input being invalid

func NewErrorInvalidInput added in v0.1.18

func NewErrorInvalidInput(apiError *v1.Error) *ErrorInvalidInput

NewErrorInvalidInput creates new instance of ErrorInvalidInput based on Error Model

func (ErrorInvalidInput) Code added in v0.1.18

func (b ErrorInvalidInput) Code() int

func (ErrorInvalidInput) Error added in v0.1.18

func (b ErrorInvalidInput) Error() string

func (ErrorInvalidInput) Message added in v0.1.18

func (b ErrorInvalidInput) Message() string

type ErrorNotFound added in v0.1.17

type ErrorNotFound struct {
	// contains filtered or unexported fields
}

ErrorNotFound represents error of missing resource

func NewErrorNotFound added in v0.1.18

func NewErrorNotFound(apiError *v1.Error) *ErrorNotFound

NewErrorNotFound creates new instance of ErrorNotFound based on Error Model

func (ErrorNotFound) Code added in v0.1.17

func (b ErrorNotFound) Code() int

func (ErrorNotFound) Error added in v0.1.17

func (b ErrorNotFound) Error() string

func (ErrorNotFound) Message added in v0.1.17

func (b ErrorNotFound) Message() string

type ErrorServerUnknownError added in v0.1.17

type ErrorServerUnknownError struct {
	// contains filtered or unexported fields
}

ErrorServerUnknownError represents unknown server error

func NewErrorServerUnknownError added in v0.1.18

func NewErrorServerUnknownError(apiError *v1.Error) *ErrorServerUnknownError

NewErrorServerUnknownError creates new instance of ErrorServerUnknownError based on Error Model

func (ErrorServerUnknownError) Code added in v0.1.17

func (b ErrorServerUnknownError) Code() int

func (ErrorServerUnknownError) Error added in v0.1.17

func (b ErrorServerUnknownError) Error() string

func (ErrorServerUnknownError) Message added in v0.1.17

func (b ErrorServerUnknownError) Message() string

type ErrorUnauthorized added in v0.1.18

type ErrorUnauthorized struct {
	// contains filtered or unexported fields
}

ErrorUnauthorized represents authn error

func NewErrorUnauthorized added in v0.1.18

func NewErrorUnauthorized(apiError *v1.Error) *ErrorUnauthorized

NewErrorUnauthorized creates new instance of ErrorUnauthorized based on Error Model

func (ErrorUnauthorized) Code added in v0.1.18

func (b ErrorUnauthorized) Code() int

func (ErrorUnauthorized) Error added in v0.1.18

func (b ErrorUnauthorized) Error() string

func (ErrorUnauthorized) Message added in v0.1.18

func (b ErrorUnauthorized) Message() string

type EventsClient added in v0.1.17

type EventsClient interface {
	// Emit an event
	EmitEvent(ctx context.Context, organizationID string, emission *v1.Emission) (*v1.Emission, error)

	// Subscriptions
	CreateSubscription(ctx context.Context, organizationID string, subscription *v1.Subscription) (*v1.Subscription, error)
	DeleteSubscription(ctx context.Context, organizationID string, subscriptionName string) (*v1.Subscription, error)
	GetSubscription(ctx context.Context, organizationID string, subscriptionName string) (*v1.Subscription, error)
	ListSubscriptions(ctx context.Context, organizationID string) ([]v1.Subscription, error)
	UpdateSubscription(ctx context.Context, organizationID string, subscription *v1.Subscription) (*v1.Subscription, error)

	// Event Drivers
	CreateEventDriver(ctx context.Context, organizationID string, eventDriver *v1.EventDriver) (*v1.EventDriver, error)
	DeleteEventDriver(ctx context.Context, organizationID string, eventDriverName string) (*v1.EventDriver, error)
	GetEventDriver(ctx context.Context, organizationID string, eventDriverName string) (*v1.EventDriver, error)
	ListEventDrivers(ctx context.Context, organizationID string) ([]v1.EventDriver, error)
	UpdateEventDriver(ctx context.Context, organizationID string, eventDriver *v1.EventDriver) (*v1.EventDriver, error)

	// Event Driver Types
	CreateEventDriverType(ctx context.Context, organizationID string, eventDriverType *v1.EventDriverType) (*v1.EventDriverType, error)
	DeleteEventDriverType(ctx context.Context, organizationID string, eventDriverTypeName string) (*v1.EventDriverType, error)
	GetEventDriverType(ctx context.Context, organizationID string, eventDriverTypeName string) (*v1.EventDriverType, error)
	ListEventDriverTypes(ctx context.Context, organizationID string) ([]v1.EventDriverType, error)
	UpdateEventDriverType(ctx context.Context, organizationID string, eventDriverType *v1.EventDriverType) (*v1.EventDriverType, error)
}

EventsClient defines the event client interface

type FunctionOpts added in v0.1.20

type FunctionOpts struct {
	FunctionName *string
	RunName      *string
	Since        time.Time
}

FunctionOpts are options for retrieving function runs

type FunctionsClient

type FunctionsClient interface {
	// Function Runner
	RunFunction(ctx context.Context, organizationID string, run *v1.Run) (*v1.Run, error)
	GetFunctionRun(ctx context.Context, organizationID string, opts FunctionOpts) (*v1.Run, error)
	ListRuns(ctx context.Context, organizationID string, opts FunctionOpts) ([]v1.Run, error)

	// Function store
	CreateFunction(ctx context.Context, organizationID string, function *v1.Function) (*v1.Function, error)
	DeleteFunction(ctx context.Context, organizationID string, functionName string) (*v1.Function, error)
	GetFunction(ctx context.Context, organizationID string, functionName string) (*v1.Function, error)
	ListFunctions(ctx context.Context, organizationID string) ([]v1.Function, error)
	UpdateFunction(ctx context.Context, organizationID string, function *v1.Function) (*v1.Function, error)
}

FunctionsClient defines the function client interface

type IdentityClient added in v0.1.18

type IdentityClient interface {
	// Policies
	CreatePolicy(ctx context.Context, organizationID string, policy *v1.Policy) (*v1.Policy, error)
	DeletePolicy(ctx context.Context, organizationID string, policyName string) (*v1.Policy, error)
	UpdatePolicy(ctx context.Context, organizationID string, policy *v1.Policy) (*v1.Policy, error)
	GetPolicy(ctx context.Context, organizationID string, policyName string) (*v1.Policy, error)
	ListPolicies(ctx context.Context, organizationID string) ([]v1.Policy, error)

	// Organizations
	CreateOrganization(ctx context.Context, organizationID string, org *v1.Organization) (*v1.Organization, error)
	DeleteOrganization(ctx context.Context, organizationID string, orgName string) (*v1.Organization, error)
	UpdateOrganization(ctx context.Context, organizationID string, org *v1.Organization) (*v1.Organization, error)
	GetOrganization(ctx context.Context, organizationID string, orgName string) (*v1.Organization, error)
	ListOrganizations(ctx context.Context, organizationID string) ([]v1.Organization, error)

	// Service Accounts
	CreateServiceAccount(ctx context.Context, organizationID string, svcAccount *v1.ServiceAccount) (*v1.ServiceAccount, error)
	DeleteServiceAccount(ctx context.Context, organizationID string, svcAccountName string) (*v1.ServiceAccount, error)
	UpdateServiceAccount(ctx context.Context, organizationID string, svcAccount *v1.ServiceAccount) (*v1.ServiceAccount, error)
	GetServiceAccount(ctx context.Context, organizationID string, svcAccountName string) (*v1.ServiceAccount, error)
	ListServiceAccounts(ctx context.Context, organizationID string) ([]v1.ServiceAccount, error)

	// Other operations
	GetVersion(ctx context.Context) (*v1.Version, error)
	Home(ctx context.Context, organizationID string) (*v1.Message, error)
}

IdentityClient defines the identity client interface

type ImagesClient added in v0.1.15

type ImagesClient interface {
	// Images
	CreateImage(ctx context.Context, organizationID string, image *v1.Image) (*v1.Image, error)
	DeleteImage(ctx context.Context, organizationID string, imageName string) (*v1.Image, error)
	UpdateImage(ctx context.Context, organizationID string, image *v1.Image) (*v1.Image, error)
	GetImage(ctx context.Context, organizationID string, imageName string) (*v1.Image, error)
	ListImages(ctx context.Context, organizationID string) ([]v1.Image, error)

	// BaseImages
	CreateBaseImage(ctx context.Context, organizationID string, baseImage *v1.BaseImage) (*v1.BaseImage, error)
	DeleteBaseImage(ctx context.Context, organizationID string, baseImageName string) (*v1.BaseImage, error)
	UpdateBaseImage(ctx context.Context, organizationID string, baseImage *v1.BaseImage) (*v1.BaseImage, error)
	GetBaseImage(ctx context.Context, organizationID string, baseImageName string) (*v1.BaseImage, error)
	ListBaseImages(ctx context.Context, organizationID string) ([]v1.BaseImage, error)
}

ImagesClient defines the image client interface

func NewImagesClient added in v0.1.15

func NewImagesClient(host string, auth runtime.ClientAuthInfoWriter, organizationID string) ImagesClient

NewImagesClient is used to create a new Images client

type SecretsClient added in v0.1.15

type SecretsClient interface {
	CreateSecret(ctx context.Context, organizationID string, secret *v1.Secret) (*v1.Secret, error)
	DeleteSecret(ctx context.Context, organizationID string, secretName string) error
	UpdateSecret(ctx context.Context, organizationID string, secret *v1.Secret) (*v1.Secret, error)
	GetSecret(ctx context.Context, organizationID string, secretName string) (*v1.Secret, error)
	ListSecrets(ctx context.Context, organizationID string) ([]v1.Secret, error)
}

SecretsClient defines the secrets client interface

func NewSecretsClient added in v0.1.15

func NewSecretsClient(host string, auth runtime.ClientAuthInfoWriter, organizationID string) SecretsClient

NewSecretsClient is used to create a new secrets client

type ServicesClient added in v0.1.15

type ServicesClient interface {
	// Service Instances
	CreateServiceInstance(ctx context.Context, organizationID string, serviceInstance *v1.ServiceInstance) (*v1.ServiceInstance, error)
	DeleteServiceInstance(ctx context.Context, organizationID string, serviceInstanceName string) error
	GetServiceInstance(ctx context.Context, organizationID string, serviceInstanceName string) (*v1.ServiceInstance, error)
	ListServiceInstances(ctx context.Context, organizationID string) ([]v1.ServiceInstance, error)

	// Service Classes
	GetServiceClass(ctx context.Context, organizationID string, serviceClassName string) (*v1.ServiceClass, error)
	ListServiceClasses(ctx context.Context, organizationID string) ([]v1.ServiceClass, error)
}

ServicesClient defines the services client interface

type TracingRoundTripper added in v0.1.15

type TracingRoundTripper struct {
	// contains filtered or unexported fields
}

TracingRoundTripper injects tracing headers into the request based on the context

func NewTracingRoundTripper added in v0.1.15

func NewTracingRoundTripper(next http.RoundTripper) *TracingRoundTripper

NewTracingRoundTripper returns new instance of RoundTripper

func (*TracingRoundTripper) RoundTrip added in v0.1.15

func (t *TracingRoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip injects tracing payload into HTTP headers if request context contains one

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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