api

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)
View Source
const (
	// DefaultAPIBaseURL is the default FTL API endpoint
	DefaultAPIBaseURL = "https://vnwyancgjj.execute-api.us-west-2.amazonaws.com"
)

Variables

This section is empty.

Functions

func NewCreateAppRequest

func NewCreateAppRequest(server string, params *CreateAppParams, body CreateAppJSONRequestBody) (*http.Request, error)

NewCreateAppRequest calls the generic CreateApp builder with application/json body

func NewCreateAppRequestWithBody

func NewCreateAppRequestWithBody(server string, params *CreateAppParams, contentType string, body io.Reader) (*http.Request, error)

NewCreateAppRequestWithBody generates requests for CreateApp with any type of body

func NewCreateDeploymentRequest

func NewCreateDeploymentRequest(server string, appId openapi_types.UUID, params *CreateDeploymentParams, body CreateDeploymentJSONRequestBody) (*http.Request, error)

NewCreateDeploymentRequest calls the generic CreateDeployment builder with application/json body

func NewCreateDeploymentRequestWithBody

func NewCreateDeploymentRequestWithBody(server string, appId openapi_types.UUID, params *CreateDeploymentParams, contentType string, body io.Reader) (*http.Request, error)

NewCreateDeploymentRequestWithBody generates requests for CreateDeployment with any type of body

func NewCreateEcrTokenRequest

func NewCreateEcrTokenRequest(server string, params *CreateEcrTokenParams, body CreateEcrTokenJSONRequestBody) (*http.Request, error)

NewCreateEcrTokenRequest calls the generic CreateEcrToken builder with application/json body

func NewCreateEcrTokenRequestWithBody

func NewCreateEcrTokenRequestWithBody(server string, params *CreateEcrTokenParams, contentType string, body io.Reader) (*http.Request, error)

NewCreateEcrTokenRequestWithBody generates requests for CreateEcrToken with any type of body

func NewDeleteAppRequest

func NewDeleteAppRequest(server string, appId openapi_types.UUID, params *DeleteAppParams) (*http.Request, error)

NewDeleteAppRequest generates requests for DeleteApp

func NewGetAppLogsRequest

func NewGetAppLogsRequest(server string, appId openapi_types.UUID, params *GetAppLogsParams) (*http.Request, error)

NewGetAppLogsRequest generates requests for GetAppLogs

func NewGetAppRequest

func NewGetAppRequest(server string, appId openapi_types.UUID, params *GetAppParams) (*http.Request, error)

NewGetAppRequest generates requests for GetApp

func NewGetUserOrgsRequest

func NewGetUserOrgsRequest(server string, params *GetUserOrgsParams) (*http.Request, error)

NewGetUserOrgsRequest generates requests for GetUserOrgs

func NewListAppComponentsRequest

func NewListAppComponentsRequest(server string, appId openapi_types.UUID, params *ListAppComponentsParams) (*http.Request, error)

NewListAppComponentsRequest generates requests for ListAppComponents

func NewListAppsRequest

func NewListAppsRequest(server string, params *ListAppsParams) (*http.Request, error)

NewListAppsRequest generates requests for ListApps

func NewUpdateComponentsRequest

func NewUpdateComponentsRequest(server string, appId openapi_types.UUID, params *UpdateComponentsParams, body UpdateComponentsJSONRequestBody) (*http.Request, error)

NewUpdateComponentsRequest calls the generic UpdateComponents builder with application/json body

func NewUpdateComponentsRequestWithBody

func NewUpdateComponentsRequestWithBody(server string, appId openapi_types.UUID, params *UpdateComponentsParams, contentType string, body io.Reader) (*http.Request, error)

NewUpdateComponentsRequestWithBody generates requests for UpdateComponents with any type of body

Types

type App

type App struct {
	AccessControl *AppAccessControl  `json:"accessControl,omitempty"`
	AllowedRoles  *[]string          `json:"allowedRoles,omitempty"`
	AppId         openapi_types.UUID `json:"appId"`
	AppName       string             `json:"appName"`
	CreatedAt     string             `json:"createdAt"`
	CustomAuth    *struct {
		Audience string `json:"audience"`
		Issuer   string `json:"issuer"`
	} `json:"customAuth,omitempty"`
	OrgId         *string   `json:"orgId,omitempty"`
	ProviderError *string   `json:"providerError,omitempty"`
	ProviderUrl   *string   `json:"providerUrl,omitempty"`
	Status        AppStatus `json:"status"`
	UpdatedAt     string    `json:"updatedAt"`
}

App Application object

type AppAccessControl

type AppAccessControl string

AppAccessControl defines model for App.AccessControl.

const (
	AppAccessControlCustom  AppAccessControl = "custom"
	AppAccessControlOrg     AppAccessControl = "org"
	AppAccessControlPrivate AppAccessControl = "private"
	AppAccessControlPublic  AppAccessControl = "public"
)

Defines values for AppAccessControl.

type AppStatus

type AppStatus string

AppStatus defines model for App.Status.

const (
	AppStatusACTIVE   AppStatus = "ACTIVE"
	AppStatusCREATING AppStatus = "CREATING"
	AppStatusDELETED  AppStatus = "DELETED"
	AppStatusDELETING AppStatus = "DELETING"
	AppStatusFAILED   AppStatus = "FAILED"
	AppStatusPENDING  AppStatus = "PENDING"
)

Defines values for AppStatus.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CreateApp

func (c *Client) CreateApp(ctx context.Context, params *CreateAppParams, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateAppWithBody

func (c *Client) CreateAppWithBody(ctx context.Context, params *CreateAppParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDeployment

func (c *Client) CreateDeployment(ctx context.Context, appId openapi_types.UUID, params *CreateDeploymentParams, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDeploymentWithBody

func (c *Client) CreateDeploymentWithBody(ctx context.Context, appId openapi_types.UUID, params *CreateDeploymentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateEcrToken

func (c *Client) CreateEcrToken(ctx context.Context, params *CreateEcrTokenParams, body CreateEcrTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateEcrTokenWithBody

func (c *Client) CreateEcrTokenWithBody(ctx context.Context, params *CreateEcrTokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteApp

func (c *Client) DeleteApp(ctx context.Context, appId openapi_types.UUID, params *DeleteAppParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetApp

func (c *Client) GetApp(ctx context.Context, appId openapi_types.UUID, params *GetAppParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAppLogs

func (c *Client) GetAppLogs(ctx context.Context, appId openapi_types.UUID, params *GetAppLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUserOrgs

func (c *Client) GetUserOrgs(ctx context.Context, params *GetUserOrgsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListAppComponents

func (c *Client) ListAppComponents(ctx context.Context, appId openapi_types.UUID, params *ListAppComponentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListApps

func (c *Client) ListApps(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateComponents

func (c *Client) UpdateComponents(ctx context.Context, appId openapi_types.UUID, params *UpdateComponentsParams, body UpdateComponentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateComponentsWithBody

func (c *Client) UpdateComponentsWithBody(ctx context.Context, appId openapi_types.UUID, params *UpdateComponentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ListApps request
	ListApps(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateAppWithBody request with any body
	CreateAppWithBody(ctx context.Context, params *CreateAppParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateApp(ctx context.Context, params *CreateAppParams, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteApp request
	DeleteApp(ctx context.Context, appId openapi_types.UUID, params *DeleteAppParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApp request
	GetApp(ctx context.Context, appId openapi_types.UUID, params *GetAppParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListAppComponents request
	ListAppComponents(ctx context.Context, appId openapi_types.UUID, params *ListAppComponentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateComponentsWithBody request with any body
	UpdateComponentsWithBody(ctx context.Context, appId openapi_types.UUID, params *UpdateComponentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateComponents(ctx context.Context, appId openapi_types.UUID, params *UpdateComponentsParams, body UpdateComponentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateDeploymentWithBody request with any body
	CreateDeploymentWithBody(ctx context.Context, appId openapi_types.UUID, params *CreateDeploymentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateDeployment(ctx context.Context, appId openapi_types.UUID, params *CreateDeploymentParams, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAppLogs request
	GetAppLogs(ctx context.Context, appId openapi_types.UUID, params *GetAppLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateEcrTokenWithBody request with any body
	CreateEcrTokenWithBody(ctx context.Context, params *CreateEcrTokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateEcrToken(ctx context.Context, params *CreateEcrTokenParams, body CreateEcrTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUserOrgs request
	GetUserOrgs(ctx context.Context, params *GetUserOrgsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateAppWithBodyWithResponse

func (c *ClientWithResponses) CreateAppWithBodyWithResponse(ctx context.Context, params *CreateAppParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAppResponse, error)

CreateAppWithBodyWithResponse request with arbitrary body returning *CreateAppResponse

func (*ClientWithResponses) CreateAppWithResponse

func (c *ClientWithResponses) CreateAppWithResponse(ctx context.Context, params *CreateAppParams, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAppResponse, error)

func (*ClientWithResponses) CreateDeploymentWithBodyWithResponse

func (c *ClientWithResponses) CreateDeploymentWithBodyWithResponse(ctx context.Context, appId openapi_types.UUID, params *CreateDeploymentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error)

CreateDeploymentWithBodyWithResponse request with arbitrary body returning *CreateDeploymentResponse

func (*ClientWithResponses) CreateDeploymentWithResponse

func (*ClientWithResponses) CreateEcrTokenWithBodyWithResponse

func (c *ClientWithResponses) CreateEcrTokenWithBodyWithResponse(ctx context.Context, params *CreateEcrTokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEcrTokenResponse, error)

CreateEcrTokenWithBodyWithResponse request with arbitrary body returning *CreateEcrTokenResponse

func (*ClientWithResponses) CreateEcrTokenWithResponse

func (c *ClientWithResponses) CreateEcrTokenWithResponse(ctx context.Context, params *CreateEcrTokenParams, body CreateEcrTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEcrTokenResponse, error)

func (*ClientWithResponses) DeleteAppWithResponse

func (c *ClientWithResponses) DeleteAppWithResponse(ctx context.Context, appId openapi_types.UUID, params *DeleteAppParams, reqEditors ...RequestEditorFn) (*DeleteAppResponse, error)

DeleteAppWithResponse request returning *DeleteAppResponse

func (*ClientWithResponses) GetAppLogsWithResponse

func (c *ClientWithResponses) GetAppLogsWithResponse(ctx context.Context, appId openapi_types.UUID, params *GetAppLogsParams, reqEditors ...RequestEditorFn) (*GetAppLogsResponse, error)

GetAppLogsWithResponse request returning *GetAppLogsResponse

func (*ClientWithResponses) GetAppWithResponse

func (c *ClientWithResponses) GetAppWithResponse(ctx context.Context, appId openapi_types.UUID, params *GetAppParams, reqEditors ...RequestEditorFn) (*GetAppResponse, error)

GetAppWithResponse request returning *GetAppResponse

func (*ClientWithResponses) GetUserOrgsWithResponse

func (c *ClientWithResponses) GetUserOrgsWithResponse(ctx context.Context, params *GetUserOrgsParams, reqEditors ...RequestEditorFn) (*GetUserOrgsResponse, error)

GetUserOrgsWithResponse request returning *GetUserOrgsResponse

func (*ClientWithResponses) ListAppComponentsWithResponse

func (c *ClientWithResponses) ListAppComponentsWithResponse(ctx context.Context, appId openapi_types.UUID, params *ListAppComponentsParams, reqEditors ...RequestEditorFn) (*ListAppComponentsResponse, error)

ListAppComponentsWithResponse request returning *ListAppComponentsResponse

func (*ClientWithResponses) ListAppsWithResponse

func (c *ClientWithResponses) ListAppsWithResponse(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*ListAppsResponse, error)

ListAppsWithResponse request returning *ListAppsResponse

func (*ClientWithResponses) UpdateComponentsWithBodyWithResponse

func (c *ClientWithResponses) UpdateComponentsWithBodyWithResponse(ctx context.Context, appId openapi_types.UUID, params *UpdateComponentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateComponentsResponse, error)

UpdateComponentsWithBodyWithResponse request with arbitrary body returning *UpdateComponentsResponse

func (*ClientWithResponses) UpdateComponentsWithResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListAppsWithResponse request
	ListAppsWithResponse(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*ListAppsResponse, error)

	// CreateAppWithBodyWithResponse request with any body
	CreateAppWithBodyWithResponse(ctx context.Context, params *CreateAppParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAppResponse, error)

	CreateAppWithResponse(ctx context.Context, params *CreateAppParams, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAppResponse, error)

	// DeleteAppWithResponse request
	DeleteAppWithResponse(ctx context.Context, appId openapi_types.UUID, params *DeleteAppParams, reqEditors ...RequestEditorFn) (*DeleteAppResponse, error)

	// GetAppWithResponse request
	GetAppWithResponse(ctx context.Context, appId openapi_types.UUID, params *GetAppParams, reqEditors ...RequestEditorFn) (*GetAppResponse, error)

	// ListAppComponentsWithResponse request
	ListAppComponentsWithResponse(ctx context.Context, appId openapi_types.UUID, params *ListAppComponentsParams, reqEditors ...RequestEditorFn) (*ListAppComponentsResponse, error)

	// UpdateComponentsWithBodyWithResponse request with any body
	UpdateComponentsWithBodyWithResponse(ctx context.Context, appId openapi_types.UUID, params *UpdateComponentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateComponentsResponse, error)

	UpdateComponentsWithResponse(ctx context.Context, appId openapi_types.UUID, params *UpdateComponentsParams, body UpdateComponentsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateComponentsResponse, error)

	// CreateDeploymentWithBodyWithResponse request with any body
	CreateDeploymentWithBodyWithResponse(ctx context.Context, appId openapi_types.UUID, params *CreateDeploymentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error)

	CreateDeploymentWithResponse(ctx context.Context, appId openapi_types.UUID, params *CreateDeploymentParams, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error)

	// GetAppLogsWithResponse request
	GetAppLogsWithResponse(ctx context.Context, appId openapi_types.UUID, params *GetAppLogsParams, reqEditors ...RequestEditorFn) (*GetAppLogsResponse, error)

	// CreateEcrTokenWithBodyWithResponse request with any body
	CreateEcrTokenWithBodyWithResponse(ctx context.Context, params *CreateEcrTokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEcrTokenResponse, error)

	CreateEcrTokenWithResponse(ctx context.Context, params *CreateEcrTokenParams, body CreateEcrTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEcrTokenResponse, error)

	// GetUserOrgsWithResponse request
	GetUserOrgsWithResponse(ctx context.Context, params *GetUserOrgsParams, reqEditors ...RequestEditorFn) (*GetUserOrgsResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateAppJSONRequestBody

type CreateAppJSONRequestBody = CreateAppRequest

CreateAppJSONRequestBody defines body for CreateApp for application/json ContentType.

type CreateAppParams

type CreateAppParams struct {
	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

CreateAppParams defines parameters for CreateApp.

type CreateAppRequest

type CreateAppRequest struct {
	// AccessControl Access control mode for the application
	AccessControl *CreateAppRequestAccessControl `json:"accessControl,omitempty"`

	// AppName The name of the application
	AppName string `json:"appName"`
}

CreateAppRequest Request body for creating an app

type CreateAppRequestAccessControl

type CreateAppRequestAccessControl string

CreateAppRequestAccessControl Access control mode for the application

const (
	CreateAppRequestAccessControlCustom  CreateAppRequestAccessControl = "custom"
	CreateAppRequestAccessControlOrg     CreateAppRequestAccessControl = "org"
	CreateAppRequestAccessControlPrivate CreateAppRequestAccessControl = "private"
	CreateAppRequestAccessControlPublic  CreateAppRequestAccessControl = "public"
)

Defines values for CreateAppRequestAccessControl.

type CreateAppResponse

type CreateAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *CreateAppResponseBody
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON409      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseCreateAppResponse

func ParseCreateAppResponse(rsp *http.Response) (*CreateAppResponse, error)

ParseCreateAppResponse parses an HTTP response from a CreateAppWithResponse call

func (CreateAppResponse) Status

func (r CreateAppResponse) Status() string

Status returns HTTPResponse.Status

func (CreateAppResponse) StatusCode

func (r CreateAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateAppResponseBody

type CreateAppResponseBody struct {
	AppId     openapi_types.UUID          `json:"appId"`
	AppName   string                      `json:"appName"`
	CreatedAt string                      `json:"createdAt"`
	Status    CreateAppResponseBodyStatus `json:"status"`
	UpdatedAt string                      `json:"updatedAt"`
}

CreateAppResponseBody Response for successful app creation

type CreateAppResponseBodyStatus

type CreateAppResponseBodyStatus string

CreateAppResponseBodyStatus defines model for CreateAppResponseBody.Status.

const (
	CreateAppResponseBodyStatusACTIVE   CreateAppResponseBodyStatus = "ACTIVE"
	CreateAppResponseBodyStatusCREATING CreateAppResponseBodyStatus = "CREATING"
	CreateAppResponseBodyStatusDELETED  CreateAppResponseBodyStatus = "DELETED"
	CreateAppResponseBodyStatusDELETING CreateAppResponseBodyStatus = "DELETING"
	CreateAppResponseBodyStatusFAILED   CreateAppResponseBodyStatus = "FAILED"
	CreateAppResponseBodyStatusPENDING  CreateAppResponseBodyStatus = "PENDING"
)

Defines values for CreateAppResponseBodyStatus.

type CreateDeploymentJSONRequestBody

type CreateDeploymentJSONRequestBody = CreateDeploymentRequest

CreateDeploymentJSONRequestBody defines body for CreateDeployment for application/json ContentType.

type CreateDeploymentParams

type CreateDeploymentParams struct {
	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

CreateDeploymentParams defines parameters for CreateDeployment.

type CreateDeploymentRequest

type CreateDeploymentRequest struct {
	// Access Access control override
	Access *CreateDeploymentRequestAccess `json:"access,omitempty"`

	// Application FTL application configuration
	Application struct {
		// Access Access control mode
		Access *CreateDeploymentRequestApplicationAccess `json:"access,omitempty"`

		// Auth Authentication configuration
		Auth *struct {
			JwtAudience *string                                         `json:"jwt_audience,omitempty"`
			JwtIssuer   *string                                         `json:"jwt_issuer,omitempty"`
			OrgId       *string                                         `json:"org_id,omitempty"`
			Provider    *CreateDeploymentRequestApplicationAuthProvider `json:"provider,omitempty"`
		} `json:"auth,omitempty"`

		// Components Application components
		Components *[]struct {
			// Id Component ID
			Id string `json:"id"`

			// Source Registry reference to pushed component (components must be pushed to ECR first)
			Source struct {
				// Package Package path (e.g., app123abc/graph)
				Package string `json:"package"`

				// Registry ECR registry endpoint (e.g., 795394005211.dkr.ecr.us-west-2.amazonaws.com)
				Registry string `json:"registry"`

				// Version Component version (e.g., 0.1.0)
				Version string `json:"version"`
			} `json:"source"`

			// Variables Component-specific variables
			Variables *map[string]string `json:"variables,omitempty"`
		} `json:"components,omitempty"`

		// Description Application description
		Description *string `json:"description,omitempty"`

		// Name Application name
		Name string `json:"name"`

		// Variables Application variables
		Variables *map[string]string `json:"variables,omitempty"`

		// Version Application version
		Version *string `json:"version,omitempty"`
	} `json:"application"`

	// Auth Auth configuration override
	Auth *struct {
		JwtAudience *string                              `json:"jwt_audience,omitempty"`
		JwtIssuer   *string                              `json:"jwt_issuer,omitempty"`
		OrgId       *string                              `json:"org_id,omitempty"`
		Provider    *CreateDeploymentRequestAuthProvider `json:"provider,omitempty"`
	} `json:"auth,omitempty"`

	// Environment Deployment environment
	Environment *CreateDeploymentRequestEnvironment `json:"environment,omitempty"`

	// Variables Environment-specific variables
	Variables *map[string]string `json:"variables,omitempty"`
}

CreateDeploymentRequest Request body for creating a deployment

type CreateDeploymentRequestAccess

type CreateDeploymentRequestAccess string

CreateDeploymentRequestAccess Access control override

const (
	CreateDeploymentRequestAccessCustom  CreateDeploymentRequestAccess = "custom"
	CreateDeploymentRequestAccessOrg     CreateDeploymentRequestAccess = "org"
	CreateDeploymentRequestAccessPrivate CreateDeploymentRequestAccess = "private"
	CreateDeploymentRequestAccessPublic  CreateDeploymentRequestAccess = "public"
)

Defines values for CreateDeploymentRequestAccess.

type CreateDeploymentRequestApplicationAccess

type CreateDeploymentRequestApplicationAccess string

CreateDeploymentRequestApplicationAccess Access control mode

const (
	CreateDeploymentRequestApplicationAccessCustom  CreateDeploymentRequestApplicationAccess = "custom"
	CreateDeploymentRequestApplicationAccessOrg     CreateDeploymentRequestApplicationAccess = "org"
	CreateDeploymentRequestApplicationAccessPrivate CreateDeploymentRequestApplicationAccess = "private"
	CreateDeploymentRequestApplicationAccessPublic  CreateDeploymentRequestApplicationAccess = "public"
)

Defines values for CreateDeploymentRequestApplicationAccess.

type CreateDeploymentRequestApplicationAuthProvider

type CreateDeploymentRequestApplicationAuthProvider string

CreateDeploymentRequestApplicationAuthProvider defines model for CreateDeploymentRequest.Application.Auth.Provider.

const (
	CreateDeploymentRequestApplicationAuthProviderCustom CreateDeploymentRequestApplicationAuthProvider = "custom"
	CreateDeploymentRequestApplicationAuthProviderWorkos CreateDeploymentRequestApplicationAuthProvider = "workos"
)

Defines values for CreateDeploymentRequestApplicationAuthProvider.

type CreateDeploymentRequestAuthProvider

type CreateDeploymentRequestAuthProvider string

CreateDeploymentRequestAuthProvider defines model for CreateDeploymentRequest.Auth.Provider.

const (
	CreateDeploymentRequestAuthProviderCustom CreateDeploymentRequestAuthProvider = "custom"
	CreateDeploymentRequestAuthProviderWorkos CreateDeploymentRequestAuthProvider = "workos"
)

Defines values for CreateDeploymentRequestAuthProvider.

type CreateDeploymentRequestEnvironment

type CreateDeploymentRequestEnvironment string

CreateDeploymentRequestEnvironment Deployment environment

const (
	Development CreateDeploymentRequestEnvironment = "development"
	Production  CreateDeploymentRequestEnvironment = "production"
	Staging     CreateDeploymentRequestEnvironment = "staging"
)

Defines values for CreateDeploymentRequestEnvironment.

type CreateDeploymentResponse

type CreateDeploymentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *CreateDeploymentResponseBody
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseCreateDeploymentResponse

func ParseCreateDeploymentResponse(rsp *http.Response) (*CreateDeploymentResponse, error)

ParseCreateDeploymentResponse parses an HTTP response from a CreateDeploymentWithResponse call

func (CreateDeploymentResponse) Status

func (r CreateDeploymentResponse) Status() string

Status returns HTTPResponse.Status

func (CreateDeploymentResponse) StatusCode

func (r CreateDeploymentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateDeploymentResponseBody

type CreateDeploymentResponseBody struct {
	// AppId Application identifier
	AppId string `json:"appId"`

	// AppName Application name
	AppName string `json:"appName"`

	// AppUrl Application URL once deployed
	AppUrl *string `json:"appUrl,omitempty"`

	// DeploymentId Unique deployment identifier
	DeploymentId string `json:"deploymentId"`

	// Message Status message
	Message string `json:"message"`

	// Status Deployment status
	Status CreateDeploymentResponseBodyStatus `json:"status"`
}

CreateDeploymentResponseBody Response for successful deployment creation

type CreateDeploymentResponseBodyStatus

type CreateDeploymentResponseBodyStatus string

CreateDeploymentResponseBodyStatus Deployment status

const (
	CreateDeploymentResponseBodyStatusDEPLOYED  CreateDeploymentResponseBodyStatus = "DEPLOYED"
	CreateDeploymentResponseBodyStatusDEPLOYING CreateDeploymentResponseBodyStatus = "DEPLOYING"
	CreateDeploymentResponseBodyStatusFAILED    CreateDeploymentResponseBodyStatus = "FAILED"
)

Defines values for CreateDeploymentResponseBodyStatus.

type CreateEcrTokenJSONRequestBody

type CreateEcrTokenJSONRequestBody = CreateEcrTokenRequest

CreateEcrTokenJSONRequestBody defines body for CreateEcrToken for application/json ContentType.

type CreateEcrTokenParams

type CreateEcrTokenParams struct {
	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

CreateEcrTokenParams defines parameters for CreateEcrToken.

type CreateEcrTokenRequest

type CreateEcrTokenRequest struct {
	// AppId Application ID to create ECR token for
	AppId openapi_types.UUID `json:"appId"`

	// Components Component names to create/ensure repositories for
	Components []string `json:"components"`
}

CreateEcrTokenRequest Request body for creating ECR token

type CreateEcrTokenResponse

type CreateEcrTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CreateEcrTokenResponseBody
	JSON401      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseCreateEcrTokenResponse

func ParseCreateEcrTokenResponse(rsp *http.Response) (*CreateEcrTokenResponse, error)

ParseCreateEcrTokenResponse parses an HTTP response from a CreateEcrTokenWithResponse call

func (CreateEcrTokenResponse) Status

func (r CreateEcrTokenResponse) Status() string

Status returns HTTPResponse.Status

func (CreateEcrTokenResponse) StatusCode

func (r CreateEcrTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateEcrTokenResponseBody

type CreateEcrTokenResponseBody struct {
	// AppId Original app UUID for reference
	AppId *string `json:"appId,omitempty"`

	// AuthorizationToken Base64 encoded username:password for Docker login
	AuthorizationToken string `json:"authorizationToken"`

	// ExpiresAt Token expiration time in ISO 8601 format
	ExpiresAt string `json:"expiresAt"`

	// PackageNamespace Sanitized namespace for spin deps publish commands
	PackageNamespace *string `json:"packageNamespace,omitempty"`

	// ProxyEndpoint Full ECR endpoint URL
	ProxyEndpoint string `json:"proxyEndpoint"`

	// Region AWS region
	Region string `json:"region"`

	// RegistryUri ECR registry URI without https://
	RegistryUri string `json:"registryUri"`
}

CreateEcrTokenResponseBody ECR token response with app-scoped credentials

type DeleteAppParams

type DeleteAppParams struct {
	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

DeleteAppParams defines parameters for DeleteApp.

type DeleteAppResponse

type DeleteAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *DeleteAppResponseBody
	JSON401      *ErrorResponse
	JSON404      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseDeleteAppResponse

func ParseDeleteAppResponse(rsp *http.Response) (*DeleteAppResponse, error)

ParseDeleteAppResponse parses an HTTP response from a DeleteAppWithResponse call

func (DeleteAppResponse) Status

func (r DeleteAppResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteAppResponse) StatusCode

func (r DeleteAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteAppResponseBody

type DeleteAppResponseBody struct {
	Message string `json:"message"`
}

DeleteAppResponseBody Response for successful app deletion

type ErrorResponse

type ErrorResponse struct {
	Details *[]interface{} `json:"details,omitempty"`
	Error   *string        `json:"error,omitempty"`
	Message string         `json:"message"`
}

ErrorResponse Standard error response format

type FTLClient

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

FTLClient wraps the generated API client with authentication

func NewFTLClient

func NewFTLClient(authManager *auth.Manager, baseURL string) (*FTLClient, error)

NewFTLClient creates a new FTL API client with authentication

func (*FTLClient) Client

func (c *FTLClient) Client() *ClientWithResponses

Client returns the underlying generated client for direct access

func (*FTLClient) CreateApp

func (c *FTLClient) CreateApp(ctx context.Context, request CreateAppRequest) (*CreateAppResponseBody, error)

CreateApp creates a new application

func (*FTLClient) CreateDeployment

func (c *FTLClient) CreateDeployment(ctx context.Context, appID string, request CreateDeploymentRequest) (*CreateDeploymentResponseBody, error)

CreateDeployment triggers a new deployment for an application

func (*FTLClient) CreateECRToken

func (c *FTLClient) CreateECRToken(ctx context.Context, appID string, components []string) (*CreateEcrTokenResponseBody, error)

CreateECRToken creates a temporary ECR authorization token

func (*FTLClient) DeleteApp

func (c *FTLClient) DeleteApp(ctx context.Context, appID string) error

DeleteApp deletes an application

func (*FTLClient) GetApp

func (c *FTLClient) GetApp(ctx context.Context, appID string) (*App, error)

GetApp retrieves details of a specific app

func (*FTLClient) GetUserOrgs

func (c *FTLClient) GetUserOrgs(ctx context.Context) (*GetUserOrgsResponseBody, error)

GetUserOrgs retrieves the organizations for the authenticated user

func (*FTLClient) ListApps

func (c *FTLClient) ListApps(ctx context.Context, params *ListAppsParams) (*ListAppsResponseBody, error)

ListApps retrieves a list of applications

func (*FTLClient) UpdateComponents

func (c *FTLClient) UpdateComponents(ctx context.Context, appID string, request UpdateComponentsRequest) (*UpdateComponentsResponseBody, error)

UpdateComponents updates the component list for an app

type GetAppLogsParams

type GetAppLogsParams struct {
	// Since Time range for logs (e.g., "30m", "1h", "7d", or RFC3339/Unix timestamp)
	Since *string `form:"since,omitempty" json:"since,omitempty"`

	// Tail Number of log lines from the end (1-1000)
	Tail *string `form:"tail,omitempty" json:"tail,omitempty"`

	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

GetAppLogsParams defines parameters for GetAppLogs.

type GetAppLogsResponse

type GetAppLogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAppLogsResponseBody
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON404      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseGetAppLogsResponse

func ParseGetAppLogsResponse(rsp *http.Response) (*GetAppLogsResponse, error)

ParseGetAppLogsResponse parses an HTTP response from a GetAppLogsWithResponse call

func (GetAppLogsResponse) Status

func (r GetAppLogsResponse) Status() string

Status returns HTTPResponse.Status

func (GetAppLogsResponse) StatusCode

func (r GetAppLogsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAppLogsResponseBody

type GetAppLogsResponseBody struct {
	// AppId Application ID
	AppId openapi_types.UUID `json:"appId"`

	// Logs Raw log output from the application
	Logs     string `json:"logs"`
	Metadata struct {
		// Since Time range used for the query
		Since string `json:"since"`

		// Tail Number of lines requested
		Tail float32 `json:"tail"`
	} `json:"metadata"`
}

GetAppLogsResponseBody Application logs response

type GetAppParams

type GetAppParams struct {
	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

GetAppParams defines parameters for GetApp.

type GetAppResponse

type GetAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *App
	JSON401      *ErrorResponse
	JSON404      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseGetAppResponse

func ParseGetAppResponse(rsp *http.Response) (*GetAppResponse, error)

ParseGetAppResponse parses an HTTP response from a GetAppWithResponse call

func (GetAppResponse) Status

func (r GetAppResponse) Status() string

Status returns HTTPResponse.Status

func (GetAppResponse) StatusCode

func (r GetAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserOrgsParams

type GetUserOrgsParams struct {
	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

GetUserOrgsParams defines parameters for GetUserOrgs.

type GetUserOrgsResponse

type GetUserOrgsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetUserOrgsResponseBody
	JSON401      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseGetUserOrgsResponse

func ParseGetUserOrgsResponse(rsp *http.Response) (*GetUserOrgsResponse, error)

ParseGetUserOrgsResponse parses an HTTP response from a GetUserOrgsWithResponse call

func (GetUserOrgsResponse) Status

func (r GetUserOrgsResponse) Status() string

Status returns HTTPResponse.Status

func (GetUserOrgsResponse) StatusCode

func (r GetUserOrgsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserOrgsResponseBody

type GetUserOrgsResponseBody struct {
	// Organizations List of organizations the user belongs to
	Organizations []struct {
		// Id Organization ID from WorkOS
		Id string `json:"id"`

		// Name Organization name
		Name string `json:"name"`
	} `json:"organizations"`
}

GetUserOrgsResponseBody List of user organizations

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListAppComponentsParams

type ListAppComponentsParams struct {
	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

ListAppComponentsParams defines parameters for ListAppComponents.

type ListAppComponentsResponse

type ListAppComponentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListComponentsResponseBody
	JSON401      *ErrorResponse
	JSON404      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseListAppComponentsResponse

func ParseListAppComponentsResponse(rsp *http.Response) (*ListAppComponentsResponse, error)

ParseListAppComponentsResponse parses an HTTP response from a ListAppComponentsWithResponse call

func (ListAppComponentsResponse) Status

func (r ListAppComponentsResponse) Status() string

Status returns HTTPResponse.Status

func (ListAppComponentsResponse) StatusCode

func (r ListAppComponentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListAppsParams

type ListAppsParams struct {
	// Limit Number of items to return (1-100)
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// NextToken Pagination token from previous response
	NextToken *string `form:"nextToken,omitempty" json:"nextToken,omitempty"`

	// Name Filter by app name
	Name *string `form:"name,omitempty" json:"name,omitempty"`

	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

ListAppsParams defines parameters for ListApps.

type ListAppsResponse

type ListAppsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListAppsResponseBody
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseListAppsResponse

func ParseListAppsResponse(rsp *http.Response) (*ListAppsResponse, error)

ParseListAppsResponse parses an HTTP response from a ListAppsWithResponse call

func (ListAppsResponse) Status

func (r ListAppsResponse) Status() string

Status returns HTTPResponse.Status

func (ListAppsResponse) StatusCode

func (r ListAppsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListAppsResponseBody

type ListAppsResponseBody struct {
	Apps []struct {
		AccessControl *ListAppsResponseBodyAppsAccessControl `json:"accessControl,omitempty"`
		AllowedRoles  *[]string                              `json:"allowedRoles,omitempty"`
		AppId         openapi_types.UUID                     `json:"appId"`
		AppName       string                                 `json:"appName"`
		CreatedAt     string                                 `json:"createdAt"`
		CustomAuth    *struct {
			Audience string `json:"audience"`
			Issuer   string `json:"issuer"`
		} `json:"customAuth,omitempty"`
		OrgId         *string                        `json:"orgId,omitempty"`
		ProviderError *string                        `json:"providerError,omitempty"`
		ProviderUrl   *string                        `json:"providerUrl,omitempty"`
		Status        ListAppsResponseBodyAppsStatus `json:"status"`
		UpdatedAt     string                         `json:"updatedAt"`
	} `json:"apps"`
	NextToken *string `json:"nextToken,omitempty"`
}

ListAppsResponseBody List of applications with pagination

type ListAppsResponseBodyAppsAccessControl

type ListAppsResponseBodyAppsAccessControl string

ListAppsResponseBodyAppsAccessControl defines model for ListAppsResponseBody.Apps.AccessControl.

Defines values for ListAppsResponseBodyAppsAccessControl.

type ListAppsResponseBodyAppsStatus

type ListAppsResponseBodyAppsStatus string

ListAppsResponseBodyAppsStatus defines model for ListAppsResponseBody.Apps.Status.

const (
	ListAppsResponseBodyAppsStatusACTIVE   ListAppsResponseBodyAppsStatus = "ACTIVE"
	ListAppsResponseBodyAppsStatusCREATING ListAppsResponseBodyAppsStatus = "CREATING"
	ListAppsResponseBodyAppsStatusDELETED  ListAppsResponseBodyAppsStatus = "DELETED"
	ListAppsResponseBodyAppsStatusDELETING ListAppsResponseBodyAppsStatus = "DELETING"
	ListAppsResponseBodyAppsStatusFAILED   ListAppsResponseBodyAppsStatus = "FAILED"
	ListAppsResponseBodyAppsStatusPENDING  ListAppsResponseBodyAppsStatus = "PENDING"
)

Defines values for ListAppsResponseBodyAppsStatus.

type ListComponentsResponseBody

type ListComponentsResponseBody struct {
	AppId      openapi_types.UUID `json:"appId"`
	AppName    string             `json:"appName"`
	Components []struct {
		ComponentName  string  `json:"componentName"`
		Description    *string `json:"description,omitempty"`
		RepositoryName *string `json:"repositoryName,omitempty"`
		RepositoryUri  *string `json:"repositoryUri,omitempty"`
	} `json:"components"`
}

ListComponentsResponseBody List of components for an app

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type UpdateComponentsJSONRequestBody

type UpdateComponentsJSONRequestBody = UpdateComponentsRequest

UpdateComponentsJSONRequestBody defines body for UpdateComponents for application/json ContentType.

type UpdateComponentsParams

type UpdateComponentsParams struct {
	// Authorization Bearer token for authentication
	Authorization string `json:"Authorization"`
}

UpdateComponentsParams defines parameters for UpdateComponents.

type UpdateComponentsRequest

type UpdateComponentsRequest struct {
	Components []struct {
		ComponentName string  `json:"componentName"`
		Description   *string `json:"description,omitempty"`
	} `json:"components"`
}

UpdateComponentsRequest Request body for updating components

type UpdateComponentsResponse

type UpdateComponentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *UpdateComponentsResponseBody
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON404      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseUpdateComponentsResponse

func ParseUpdateComponentsResponse(rsp *http.Response) (*UpdateComponentsResponse, error)

ParseUpdateComponentsResponse parses an HTTP response from a UpdateComponentsWithResponse call

func (UpdateComponentsResponse) Status

func (r UpdateComponentsResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateComponentsResponse) StatusCode

func (r UpdateComponentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateComponentsResponseBody

type UpdateComponentsResponseBody struct {
	Changes struct {
		Created []string `json:"created"`
		Removed []string `json:"removed"`
		Updated []string `json:"updated"`
	} `json:"changes"`
	Components []struct {
		ComponentName  string  `json:"componentName"`
		Description    *string `json:"description,omitempty"`
		RepositoryName *string `json:"repositoryName,omitempty"`
		RepositoryUri  *string `json:"repositoryUri,omitempty"`
	} `json:"components"`
}

UpdateComponentsResponseBody Response for successful components update

Jump to

Keyboard shortcuts

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