api

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 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 NewCreateDeployCredentialsRequest

func NewCreateDeployCredentialsRequest(server string, appId openapi_types.UUID, params *CreateDeployCredentialsParams, body CreateDeployCredentialsJSONRequestBody) (*http.Request, error)

NewCreateDeployCredentialsRequest calls the generic CreateDeployCredentials builder with application/json body

func NewCreateDeployCredentialsRequestWithBody

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

NewCreateDeployCredentialsRequestWithBody generates requests for CreateDeployCredentials 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 NewGetUserInfoRequest

func NewGetUserInfoRequest(server string, params *GetUserInfoParams) (*http.Request, error)

NewGetUserInfoRequest generates requests for GetUserInfo

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"`

	// LatestDeployment Latest deployment information for this app
	LatestDeployment *struct {
		CreatedAt          *float32                  `json:"createdAt,omitempty"`
		DeployedAt         *float32                  `json:"deployedAt,omitempty"`
		DeploymentDuration *float32                  `json:"deploymentDuration,omitempty"`
		DeploymentId       string                    `json:"deploymentId"`
		Environment        *string                   `json:"environment,omitempty"`
		Status             AppLatestDeploymentStatus `json:"status"`
		StatusMessage      *string                   `json:"statusMessage,omitempty"`
	} `json:"latestDeployment"`
	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 AppLatestDeploymentStatus

type AppLatestDeploymentStatus string

AppLatestDeploymentStatus defines model for App.LatestDeployment.Status.

const (
	AppLatestDeploymentStatusDeployed   AppLatestDeploymentStatus = "deployed"
	AppLatestDeploymentStatusDeploying  AppLatestDeploymentStatus = "deploying"
	AppLatestDeploymentStatusFailed     AppLatestDeploymentStatus = "failed"
	AppLatestDeploymentStatusPending    AppLatestDeploymentStatus = "pending"
	AppLatestDeploymentStatusRolledBack AppLatestDeploymentStatus = "rolled_back"
)

Defines values for AppLatestDeploymentStatus.

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) CreateDeployCredentials

func (c *Client) CreateDeployCredentials(ctx context.Context, appId openapi_types.UUID, params *CreateDeployCredentialsParams, body CreateDeployCredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDeployCredentialsWithBody

func (c *Client) CreateDeployCredentialsWithBody(ctx context.Context, appId openapi_types.UUID, params *CreateDeployCredentialsParams, 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) GetUserInfo

func (c *Client) GetUserInfo(ctx context.Context, params *GetUserInfoParams, 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)

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

	CreateDeployCredentials(ctx context.Context, appId openapi_types.UUID, params *CreateDeployCredentialsParams, body CreateDeployCredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	// GetUserInfo request
	GetUserInfo(ctx context.Context, params *GetUserInfoParams, 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) (*CreateAppWithResponse, error)

CreateAppWithBodyWithResponse request with arbitrary body returning *CreateAppWithResponse

func (*ClientWithResponses) CreateAppWithResponse

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

func (*ClientWithResponses) CreateDeployCredentialsWithBodyWithResponse

func (c *ClientWithResponses) CreateDeployCredentialsWithBodyWithResponse(ctx context.Context, appId openapi_types.UUID, params *CreateDeployCredentialsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeployCredentialsWithResponse, error)

CreateDeployCredentialsWithBodyWithResponse request with arbitrary body returning *CreateDeployCredentialsWithResponse

func (*ClientWithResponses) DeleteAppWithResponse

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

DeleteAppWithResponse request returning *DeleteAppWithResponse

func (*ClientWithResponses) GetAppLogsWithResponse

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

GetAppLogsWithResponse request returning *GetAppLogsWithResponse

func (*ClientWithResponses) GetAppWithResponse

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

GetAppWithResponse request returning *GetAppWithResponse

func (*ClientWithResponses) GetUserInfoWithResponse

func (c *ClientWithResponses) GetUserInfoWithResponse(ctx context.Context, params *GetUserInfoParams, reqEditors ...RequestEditorFn) (*GetUserInfoWithResponse, error)

GetUserInfoWithResponse request returning *GetUserInfoWithResponse

func (*ClientWithResponses) ListAppComponentsWithResponse

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

ListAppComponentsWithResponse request returning *ListAppComponentsWithResponse

func (*ClientWithResponses) ListAppsWithResponse

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

ListAppsWithResponse request returning *ListAppsWithResponse

func (*ClientWithResponses) UpdateComponentsWithBodyWithResponse

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

UpdateComponentsWithBodyWithResponse request with arbitrary body returning *UpdateComponentsWithResponse

func (*ClientWithResponses) UpdateComponentsWithResponse

type ClientWithResponsesInterface

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

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

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

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

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

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

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

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

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

	CreateDeployCredentialsWithResponse(ctx context.Context, appId openapi_types.UUID, params *CreateDeployCredentialsParams, body CreateDeployCredentialsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeployCredentialsWithResponse, error)

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

	// GetUserInfoWithResponse request
	GetUserInfoWithResponse(ctx context.Context, params *GetUserInfoParams, reqEditors ...RequestEditorFn) (*GetUserInfoWithResponse, 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 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 CreateAppWithResponse

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

func ParseCreateAppWithResponse

func ParseCreateAppWithResponse(rsp *http.Response) (*CreateAppWithResponse, error)

ParseCreateAppWithResponse parses an HTTP response from a CreateAppWithResponse call

func (CreateAppWithResponse) Status

func (r CreateAppWithResponse) Status() string

Status returns HTTPResponse.Status

func (CreateAppWithResponse) StatusCode

func (r CreateAppWithResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateDeployCredentialsJSONRequestBody

type CreateDeployCredentialsJSONRequestBody = CreateDeployCredentialsRequest

CreateDeployCredentialsJSONRequestBody defines body for CreateDeployCredentials for application/json ContentType.

type CreateDeployCredentialsParams

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

CreateDeployCredentialsParams defines parameters for CreateDeployCredentials.

type CreateDeployCredentialsRequest

type CreateDeployCredentialsRequest struct {
	// AppId Application ID to create deployment credentials for
	AppId openapi_types.UUID `json:"appId"`

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

CreateDeployCredentialsRequest Request body for creating deployment credentials

type CreateDeployCredentialsResponseBody

type CreateDeployCredentialsResponseBody struct {
	// AppId Application ID
	AppId      openapi_types.UUID `json:"appId"`
	Deployment struct {
		// Context Actor context for deployment
		Context struct {
			// ActorType Type of actor making the deployment
			ActorType CreateDeployCredentialsResponseBodyDeploymentContextActorType `json:"actorType"`

			// OrgIds Organization IDs (user: all their orgs, machine: single org)
			OrgIds []string `json:"orgIds"`

			// UserId User ID (empty for machine actors)
			UserId string `json:"userId"`
		} `json:"context"`
		Credentials struct {
			// AccessKeyId AWS access key ID
			AccessKeyId string `json:"accessKeyId"`

			// ExpiresAt Credentials expiration time
			ExpiresAt string `json:"expiresAt"`

			// SecretAccessKey AWS secret access key
			SecretAccessKey string `json:"secretAccessKey"`

			// SessionToken AWS session token
			SessionToken string `json:"sessionToken"`
		} `json:"credentials"`

		// FunctionUrl Lambda function URL for deployment
		FunctionUrl string `json:"functionUrl"`
	} `json:"deployment"`
	Registry struct {
		// AuthorizationToken ECR authorization token
		AuthorizationToken string `json:"authorizationToken"`

		// ExpiresAt ECR token expiration time
		ExpiresAt string `json:"expiresAt"`

		// PackageNamespace ECR namespace for components
		PackageNamespace string `json:"packageNamespace"`

		// ProxyEndpoint ECR proxy endpoint
		ProxyEndpoint string `json:"proxyEndpoint"`

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

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

CreateDeployCredentialsResponseBody Deployment credentials response with registry and deployment access

type CreateDeployCredentialsResponseBodyDeploymentContextActorType

type CreateDeployCredentialsResponseBodyDeploymentContextActorType string

CreateDeployCredentialsResponseBodyDeploymentContextActorType Type of actor making the deployment

Defines values for CreateDeployCredentialsResponseBodyDeploymentContextActorType.

type CreateDeployCredentialsWithResponse

type CreateDeployCredentialsWithResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CreateDeployCredentialsResponseBody
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON404      *ErrorResponse
	JSON500      *ErrorResponse
}

func ParseCreateDeployCredentialsWithResponse

func ParseCreateDeployCredentialsWithResponse(rsp *http.Response) (*CreateDeployCredentialsWithResponse, error)

ParseCreateDeployCredentialsWithResponse parses an HTTP response from a CreateDeployCredentialsWithResponse call

func (CreateDeployCredentialsWithResponse) Status

Status returns HTTPResponse.Status

func (CreateDeployCredentialsWithResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type DeleteAppParams

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

DeleteAppParams defines parameters for DeleteApp.

type DeleteAppResponseBody

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

DeleteAppResponseBody Response for successful app deletion

type DeleteAppWithResponse

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

func ParseDeleteAppWithResponse

func ParseDeleteAppWithResponse(rsp *http.Response) (*DeleteAppWithResponse, error)

ParseDeleteAppWithResponse parses an HTTP response from a DeleteAppWithResponse call

func (DeleteAppWithResponse) Status

func (r DeleteAppWithResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteAppWithResponse) StatusCode

func (r DeleteAppWithResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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) CreateDeployCredentials

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

CreateDeployCredentials creates temporary credentials for deployment (ECR and Lambda)

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) GetAuthToken

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

GetAuthToken returns the current auth token

func (*FTLClient) GetBaseURL

func (c *FTLClient) GetBaseURL() string

GetBaseURL returns the base URL for the API

func (*FTLClient) GetUserInfo

func (c *FTLClient) GetUserInfo(ctx context.Context) (*GetUserInfoResponseBody, error)

GetUserInfo retrieves the user information and organizations

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 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 GetAppLogsWithResponse

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

func ParseGetAppLogsWithResponse

func ParseGetAppLogsWithResponse(rsp *http.Response) (*GetAppLogsWithResponse, error)

ParseGetAppLogsWithResponse parses an HTTP response from a GetAppLogsWithResponse call

func (GetAppLogsWithResponse) Status

func (r GetAppLogsWithResponse) Status() string

Status returns HTTPResponse.Status

func (GetAppLogsWithResponse) StatusCode

func (r GetAppLogsWithResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAppParams

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

GetAppParams defines parameters for GetApp.

type GetAppWithResponse

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

func ParseGetAppWithResponse

func ParseGetAppWithResponse(rsp *http.Response) (*GetAppWithResponse, error)

ParseGetAppWithResponse parses an HTTP response from a GetAppWithResponse call

func (GetAppWithResponse) Status

func (r GetAppWithResponse) Status() string

Status returns HTTPResponse.Status

func (GetAppWithResponse) StatusCode

func (r GetAppWithResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserInfoParams

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

GetUserInfoParams defines parameters for GetUserInfo.

type GetUserInfoResponseBody

type GetUserInfoResponseBody 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"`

	// User User information
	User struct {
		// Email User email address
		Email *string `json:"email"`

		// Id User ID from WorkOS
		Id string `json:"id"`

		// Name User full name
		Name *string `json:"name"`
	} `json:"user"`
}

GetUserInfoResponseBody User information with organizations

type GetUserInfoWithResponse

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

func ParseGetUserInfoWithResponse

func ParseGetUserInfoWithResponse(rsp *http.Response) (*GetUserInfoWithResponse, error)

ParseGetUserInfoWithResponse parses an HTTP response from a GetUserInfoWithResponse call

func (GetUserInfoWithResponse) Status

func (r GetUserInfoWithResponse) Status() string

Status returns HTTPResponse.Status

func (GetUserInfoWithResponse) StatusCode

func (r GetUserInfoWithResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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 ListAppComponentsWithResponse

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

func ParseListAppComponentsWithResponse

func ParseListAppComponentsWithResponse(rsp *http.Response) (*ListAppComponentsWithResponse, error)

ParseListAppComponentsWithResponse parses an HTTP response from a ListAppComponentsWithResponse call

func (ListAppComponentsWithResponse) Status

Status returns HTTPResponse.Status

func (ListAppComponentsWithResponse) StatusCode

func (r ListAppComponentsWithResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListAppsParams

type ListAppsParams struct {
	// Name Filter by app name (partial match)
	Name *string `form:"name,omitempty" json:"name,omitempty"`

	// IncludeDeleted Include deleted apps in the response
	IncludeDeleted *ListAppsParamsIncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`

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

ListAppsParams defines parameters for ListApps.

type ListAppsParamsIncludeDeleted

type ListAppsParamsIncludeDeleted string

ListAppsParamsIncludeDeleted defines parameters for ListApps.

const (
	False ListAppsParamsIncludeDeleted = "false"
	True  ListAppsParamsIncludeDeleted = "true"
)

Defines values for ListAppsParamsIncludeDeleted.

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"`

		// LatestDeployment Latest deployment information for this app
		LatestDeployment *struct {
			CreatedAt          *float32                                       `json:"createdAt,omitempty"`
			DeployedAt         *float32                                       `json:"deployedAt,omitempty"`
			DeploymentDuration *float32                                       `json:"deploymentDuration,omitempty"`
			DeploymentId       string                                         `json:"deploymentId"`
			Environment        *string                                        `json:"environment,omitempty"`
			Status             ListAppsResponseBodyAppsLatestDeploymentStatus `json:"status"`
			StatusMessage      *string                                        `json:"statusMessage,omitempty"`
		} `json:"latestDeployment"`
		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"`
}

ListAppsResponseBody List of applications

type ListAppsResponseBodyAppsAccessControl

type ListAppsResponseBodyAppsAccessControl string

ListAppsResponseBodyAppsAccessControl defines model for ListAppsResponseBody.Apps.AccessControl.

Defines values for ListAppsResponseBodyAppsAccessControl.

type ListAppsResponseBodyAppsLatestDeploymentStatus

type ListAppsResponseBodyAppsLatestDeploymentStatus string

ListAppsResponseBodyAppsLatestDeploymentStatus defines model for ListAppsResponseBody.Apps.LatestDeployment.Status.

const (
	ListAppsResponseBodyAppsLatestDeploymentStatusDeployed   ListAppsResponseBodyAppsLatestDeploymentStatus = "deployed"
	ListAppsResponseBodyAppsLatestDeploymentStatusDeploying  ListAppsResponseBodyAppsLatestDeploymentStatus = "deploying"
	ListAppsResponseBodyAppsLatestDeploymentStatusFailed     ListAppsResponseBodyAppsLatestDeploymentStatus = "failed"
	ListAppsResponseBodyAppsLatestDeploymentStatusPending    ListAppsResponseBodyAppsLatestDeploymentStatus = "pending"
	ListAppsResponseBodyAppsLatestDeploymentStatusRolledBack ListAppsResponseBodyAppsLatestDeploymentStatus = "rolled_back"
)

Defines values for ListAppsResponseBodyAppsLatestDeploymentStatus.

type ListAppsResponseBodyAppsStatus

type ListAppsResponseBodyAppsStatus string

ListAppsResponseBodyAppsStatus defines model for ListAppsResponseBody.Apps.Status.

const (
	ACTIVE   ListAppsResponseBodyAppsStatus = "ACTIVE"
	CREATING ListAppsResponseBodyAppsStatus = "CREATING"
	DELETED  ListAppsResponseBodyAppsStatus = "DELETED"
	DELETING ListAppsResponseBodyAppsStatus = "DELETING"
	FAILED   ListAppsResponseBodyAppsStatus = "FAILED"
	PENDING  ListAppsResponseBodyAppsStatus = "PENDING"
)

Defines values for ListAppsResponseBodyAppsStatus.

type ListAppsWithResponse

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

func ParseListAppsWithResponse

func ParseListAppsWithResponse(rsp *http.Response) (*ListAppsWithResponse, error)

ParseListAppsWithResponse parses an HTTP response from a ListAppsWithResponse call

func (ListAppsWithResponse) Status

func (r ListAppsWithResponse) Status() string

Status returns HTTPResponse.Status

func (ListAppsWithResponse) StatusCode

func (r ListAppsWithResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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 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

type UpdateComponentsWithResponse

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

func ParseUpdateComponentsWithResponse

func ParseUpdateComponentsWithResponse(rsp *http.Response) (*UpdateComponentsWithResponse, error)

ParseUpdateComponentsWithResponse parses an HTTP response from a UpdateComponentsWithResponse call

func (UpdateComponentsWithResponse) Status

Status returns HTTPResponse.Status

func (UpdateComponentsWithResponse) StatusCode

func (r UpdateComponentsWithResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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