Documentation ¶
Index ¶
- func HTTPBuildToService(httpBuild hm.DeploymentBuild) interface{}
- func HTTPParametersToServiceParameterValues(meta service.TemplateMetadata, httpParameters []hm.KeyValue) (service.DeploymentParameterValues, error)
- func HTTPResourceToService(resource hm.DeploymentResource) service.DeploymentResource
- func HTTPStateViewToService(httpView hm.DeploymentStateView) service.DeploymentStateView
- func ServiceBuildToHTTP(svcBuild interface{}) hm.DeploymentBuild
- func ServiceDeploymentToHTTP(svcDeployment service.Deployment) hm.Deployment
- func ServiceParametersToHTTP(svcParameters []service.DeploymentParameter) []hm.KeyValue
- func ServiceResourceToHTTP(resource service.DeploymentResource) hm.DeploymentResource
- func ServiceRunToHTTP(svcRun service.DeploymentRun) hm.DeploymentRun
- func ServiceStateViewToHTTP(svcView service.DeploymentStateView) hm.DeploymentStateView
- type Client
- type ListOption
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPBuildToService ¶
func HTTPBuildToService(httpBuild hm.DeploymentBuild) interface{}
HTTPBuildToService converts the HTTP representation of deployment build to service TODO deployment build
func HTTPParametersToServiceParameterValues ¶
func HTTPParametersToServiceParameterValues(meta service.TemplateMetadata, httpParameters []hm.KeyValue) (service.DeploymentParameterValues, error)
HTTPParametersToServiceParameterValues converts the HTTP representation of parameters to service representation of parameter values. In addition to basic conversion, this function will perform basic (non-comprehensive) checks on the parameter values. The point of validation here is not to provide comprehensive parameter validation, but to toss out some bad value as early as possible, downstream services (deployment) should still do complete validation, since api-service is not the only entry point for creating a run.
func HTTPResourceToService ¶
func HTTPResourceToService(resource hm.DeploymentResource) service.DeploymentResource
HTTPResourceToService converts the HTTP representation of resource to service
func HTTPStateViewToService ¶
func HTTPStateViewToService(httpView hm.DeploymentStateView) service.DeploymentStateView
HTTPStateViewToService converts the HTTP representation of state view to service
func ServiceBuildToHTTP ¶
func ServiceBuildToHTTP(svcBuild interface{}) hm.DeploymentBuild
ServiceBuildToHTTP converts the service representation of deployment build to HTTP TODO deployment build
func ServiceDeploymentToHTTP ¶
func ServiceDeploymentToHTTP(svcDeployment service.Deployment) hm.Deployment
ServiceDeploymentToHTTP converts the service representation of deployment to HTTP
func ServiceParametersToHTTP ¶
func ServiceParametersToHTTP(svcParameters []service.DeploymentParameter) []hm.KeyValue
ServiceParametersToHTTP converts the service representation of parameters to HTTP
func ServiceResourceToHTTP ¶
func ServiceResourceToHTTP(resource service.DeploymentResource) hm.DeploymentResource
ServiceResourceToHTTP converts the service representation of resource to HTTP
func ServiceRunToHTTP ¶
func ServiceRunToHTTP(svcRun service.DeploymentRun) hm.DeploymentRun
ServiceRunToHTTP converts the service representation of deployment run to HTTP
func ServiceStateViewToHTTP ¶
func ServiceStateViewToHTTP(svcView service.DeploymentStateView) hm.DeploymentStateView
ServiceStateViewToHTTP converts the service representation of state view to HTTP
Types ¶
type Client ¶
Client is an interface for interacting with the Deployments microservice. Implementations of this interface should encapsulate information necessary to interact with the microservice, such as Nats and Stan connection information.
func New ¶
func New(queryConn messaging2.QueryConnection, eventConn messaging2.EventConnection) Client
New creates a new Deployments microservice client.
type ListOption ¶
type ListOption struct { WorkspaceID cacaocommon.ID CurrentStatus string AllCurrentStatus bool Offset int PageSize int // Return full run object for the current run FullRun bool }
ListOption is options for listing deployments
type Session ¶
type Session interface { ListDeployments(option ListOption) ([]hm.Deployment, error) SearchDeployments(option service.DeploymentListOption) ([]hm.Deployment, error) ValidateDeploymentCreationRequest(creationRequest *hm.Deployment) error AddDeployment(creationRequest *hm.Deployment) (cacaocommon.ID, error) GetDeployment(deploymentID cacaocommon.ID) (hm.Deployment, error) ValidateDeploymentUpdateRequest(deploymentID cacaocommon.ID, deployment *hm.DeploymentUpdate) error UpdateDeployment(deploymentID cacaocommon.ID, deployment *hm.DeploymentUpdate) (cacaocommon.ID, error) ValidateDeploymentDeletionRequest(deploymentID cacaocommon.ID) error DeleteDeployment(deploymentID cacaocommon.ID) (cacaocommon.ID, bool, error) ListDeploymentBuilds(deploymentID cacaocommon.ID) ([]hm.DeploymentBuild, error) ValidateDeploymentRebuildRequest(deploymentID cacaocommon.ID, params *hm.Parameters) error RebuildDeployment(deploymentID cacaocommon.ID, params *hm.Parameters) (cacaocommon.ID, error) GetDeploymentBuild(deploymentID, buildID cacaocommon.ID) (hm.DeploymentBuild, error) ListDeploymentRuns(deploymentID cacaocommon.ID) ([]hm.DeploymentRun, error) ValidateDeploymentRunRequest(deploymentID cacaocommon.ID, runRequest *hm.DeploymentRun) error RunDeployment(deploymentID cacaocommon.ID, runRequest *hm.DeploymentRun) (cacaocommon.ID, error) GetDeploymentRun(deploymentID, runID cacaocommon.ID) (hm.DeploymentRun, error) GetDeploymentLogsLocations(deploymentID cacaocommon.ID) ([]service.LogsLocation, error) GetDeploymentRunLogsLocations(deploymentID, runID cacaocommon.ID) ([]service.LogsLocation, error) }
Session is an interface for interacting with the Deployments microservice on behalf of a user. The purpose of having a session is to consolidate parameters that are common in all or most requests, but are not known at configuration time.