function

package
v1.0.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Overview

Package function provides methods and message types of the function v1beta1 API.

Index

Constants

View Source
const (
	// CronStatusUnknown is [insert doc].
	CronStatusUnknown = CronStatus("unknown")
	// CronStatusReady is [insert doc].
	CronStatusReady = CronStatus("ready")
	// CronStatusDeleting is [insert doc].
	CronStatusDeleting = CronStatus("deleting")
	// CronStatusError is [insert doc].
	CronStatusError = CronStatus("error")
	// CronStatusLocked is [insert doc].
	CronStatusLocked = CronStatus("locked")
	// CronStatusCreating is [insert doc].
	CronStatusCreating = CronStatus("creating")
	// CronStatusPending is [insert doc].
	CronStatusPending = CronStatus("pending")
)
View Source
const (
	// DomainStatusUnknown is [insert doc].
	DomainStatusUnknown = DomainStatus("unknown")
	// DomainStatusReady is [insert doc].
	DomainStatusReady = DomainStatus("ready")
	// DomainStatusDeleting is [insert doc].
	DomainStatusDeleting = DomainStatus("deleting")
	// DomainStatusError is [insert doc].
	DomainStatusError = DomainStatus("error")
	// DomainStatusCreating is [insert doc].
	DomainStatusCreating = DomainStatus("creating")
	// DomainStatusPending is [insert doc].
	DomainStatusPending = DomainStatus("pending")
)
View Source
const (
	// FunctionPrivacyUnknownPrivacy is [insert doc].
	FunctionPrivacyUnknownPrivacy = FunctionPrivacy("unknown_privacy")
	// FunctionPrivacyPublic is [insert doc].
	FunctionPrivacyPublic = FunctionPrivacy("public")
	// FunctionPrivacyPrivate is [insert doc].
	FunctionPrivacyPrivate = FunctionPrivacy("private")
)
View Source
const (
	// FunctionRuntimeUnknownRuntime is [insert doc].
	FunctionRuntimeUnknownRuntime = FunctionRuntime("unknown_runtime")
	// FunctionRuntimeGolang is [insert doc].
	FunctionRuntimeGolang = FunctionRuntime("golang")
	// FunctionRuntimePython is [insert doc].
	FunctionRuntimePython = FunctionRuntime("python")
	// FunctionRuntimePython3 is [insert doc].
	FunctionRuntimePython3 = FunctionRuntime("python3")
	// FunctionRuntimeNode8 is [insert doc].
	FunctionRuntimeNode8 = FunctionRuntime("node8")
	// FunctionRuntimeNode10 is [insert doc].
	FunctionRuntimeNode10 = FunctionRuntime("node10")
	// FunctionRuntimeNode14 is [insert doc].
	FunctionRuntimeNode14 = FunctionRuntime("node14")
)
View Source
const (
	// FunctionStatusUnknown is [insert doc].
	FunctionStatusUnknown = FunctionStatus("unknown")
	// FunctionStatusReady is [insert doc].
	FunctionStatusReady = FunctionStatus("ready")
	// FunctionStatusDeleting is [insert doc].
	FunctionStatusDeleting = FunctionStatus("deleting")
	// FunctionStatusError is [insert doc].
	FunctionStatusError = FunctionStatus("error")
	// FunctionStatusLocked is [insert doc].
	FunctionStatusLocked = FunctionStatus("locked")
	// FunctionStatusCreating is [insert doc].
	FunctionStatusCreating = FunctionStatus("creating")
	// FunctionStatusPending is [insert doc].
	FunctionStatusPending = FunctionStatus("pending")
	// FunctionStatusCreated is [insert doc].
	FunctionStatusCreated = FunctionStatus("created")
)
View Source
const (
	// ListCronsRequestOrderByCreatedAtAsc is [insert doc].
	ListCronsRequestOrderByCreatedAtAsc = ListCronsRequestOrderBy("created_at_asc")
	// ListCronsRequestOrderByCreatedAtDesc is [insert doc].
	ListCronsRequestOrderByCreatedAtDesc = ListCronsRequestOrderBy("created_at_desc")
)
View Source
const (
	// ListDomainsRequestOrderByCreatedAtAsc is [insert doc].
	ListDomainsRequestOrderByCreatedAtAsc = ListDomainsRequestOrderBy("created_at_asc")
	// ListDomainsRequestOrderByCreatedAtDesc is [insert doc].
	ListDomainsRequestOrderByCreatedAtDesc = ListDomainsRequestOrderBy("created_at_desc")
	// ListDomainsRequestOrderByHostnameAsc is [insert doc].
	ListDomainsRequestOrderByHostnameAsc = ListDomainsRequestOrderBy("hostname_asc")
	// ListDomainsRequestOrderByHostnameDesc is [insert doc].
	ListDomainsRequestOrderByHostnameDesc = ListDomainsRequestOrderBy("hostname_desc")
)
View Source
const (
	// ListFunctionsRequestOrderByCreatedAtAsc is [insert doc].
	ListFunctionsRequestOrderByCreatedAtAsc = ListFunctionsRequestOrderBy("created_at_asc")
	// ListFunctionsRequestOrderByCreatedAtDesc is [insert doc].
	ListFunctionsRequestOrderByCreatedAtDesc = ListFunctionsRequestOrderBy("created_at_desc")
	// ListFunctionsRequestOrderByNameAsc is [insert doc].
	ListFunctionsRequestOrderByNameAsc = ListFunctionsRequestOrderBy("name_asc")
	// ListFunctionsRequestOrderByNameDesc is [insert doc].
	ListFunctionsRequestOrderByNameDesc = ListFunctionsRequestOrderBy("name_desc")
)
View Source
const (
	// ListLogsRequestOrderByTimestampDesc is [insert doc].
	ListLogsRequestOrderByTimestampDesc = ListLogsRequestOrderBy("timestamp_desc")
	// ListLogsRequestOrderByTimestampAsc is [insert doc].
	ListLogsRequestOrderByTimestampAsc = ListLogsRequestOrderBy("timestamp_asc")
)
View Source
const (
	// ListNamespacesRequestOrderByCreatedAtAsc is [insert doc].
	ListNamespacesRequestOrderByCreatedAtAsc = ListNamespacesRequestOrderBy("created_at_asc")
	// ListNamespacesRequestOrderByCreatedAtDesc is [insert doc].
	ListNamespacesRequestOrderByCreatedAtDesc = ListNamespacesRequestOrderBy("created_at_desc")
	// ListNamespacesRequestOrderByNameAsc is [insert doc].
	ListNamespacesRequestOrderByNameAsc = ListNamespacesRequestOrderBy("name_asc")
	// ListNamespacesRequestOrderByNameDesc is [insert doc].
	ListNamespacesRequestOrderByNameDesc = ListNamespacesRequestOrderBy("name_desc")
)
View Source
const (
	// NamespaceStatusUnknown is [insert doc].
	NamespaceStatusUnknown = NamespaceStatus("unknown")
	// NamespaceStatusReady is [insert doc].
	NamespaceStatusReady = NamespaceStatus("ready")
	// NamespaceStatusDeleting is [insert doc].
	NamespaceStatusDeleting = NamespaceStatus("deleting")
	// NamespaceStatusError is [insert doc].
	NamespaceStatusError = NamespaceStatus("error")
	// NamespaceStatusLocked is [insert doc].
	NamespaceStatusLocked = NamespaceStatus("locked")
	// NamespaceStatusCreating is [insert doc].
	NamespaceStatusCreating = NamespaceStatus("creating")
	// NamespaceStatusPending is [insert doc].
	NamespaceStatusPending = NamespaceStatus("pending")
)
View Source
const (
	// NullValueNULLVALUE is [insert doc].
	NullValueNULLVALUE = NullValue("NULL_VALUE")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API: serverless functions API

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) CreateCron

func (s *API) CreateCron(req *CreateCronRequest, opts ...scw.RequestOption) (*Cron, error)

CreateCron: create a new cron

func (*API) CreateDomain

func (s *API) CreateDomain(req *CreateDomainRequest, opts ...scw.RequestOption) (*Domain, error)

func (*API) CreateFunction

func (s *API) CreateFunction(req *CreateFunctionRequest, opts ...scw.RequestOption) (*Function, error)

CreateFunction: create a new function

func (*API) CreateNamespace

func (s *API) CreateNamespace(req *CreateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)

CreateNamespace: create a new namespace

func (*API) DeleteCron

func (s *API) DeleteCron(req *DeleteCronRequest, opts ...scw.RequestOption) (*Cron, error)

DeleteCron: delete an existing cron

Delete the cron associated with the given id.

func (*API) DeleteDomain

func (s *API) DeleteDomain(req *DeleteDomainRequest, opts ...scw.RequestOption) (*Domain, error)

func (*API) DeleteFunction

func (s *API) DeleteFunction(req *DeleteFunctionRequest, opts ...scw.RequestOption) (*Function, error)

DeleteFunction: delete a function

Delete the function associated with the given id.

func (*API) DeleteNamespace

func (s *API) DeleteNamespace(req *DeleteNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)

DeleteNamespace: delete an existing namespace

Delete the namespace associated with the given id.

func (*API) DeployFunction

func (s *API) DeployFunction(req *DeployFunctionRequest, opts ...scw.RequestOption) (*Function, error)

DeployFunction: deploy a function

Deploy a function associated with the given id.

func (*API) GetCron

func (s *API) GetCron(req *GetCronRequest, opts ...scw.RequestOption) (*Cron, error)

GetCron: get a cron

Get the cron associated with the given id.

func (*API) GetDomain

func (s *API) GetDomain(req *GetDomainRequest, opts ...scw.RequestOption) (*Domain, error)

func (*API) GetFunction

func (s *API) GetFunction(req *GetFunctionRequest, opts ...scw.RequestOption) (*Function, error)

GetFunction: get a function

Get the function associated with the given id.

func (*API) GetFunctionDownloadURL

func (s *API) GetFunctionDownloadURL(req *GetFunctionDownloadURLRequest, opts ...scw.RequestOption) (*DownloadURL, error)

GetFunctionDownloadURL: get a download URL of a function

Get a download URL for a function associated with the given id.

func (*API) GetFunctionUploadURL

func (s *API) GetFunctionUploadURL(req *GetFunctionUploadURLRequest, opts ...scw.RequestOption) (*UploadURL, error)

GetFunctionUploadURL: get an upload URL of a function

Get an upload URL of a function associated with the given id.

func (*API) GetNamespace

func (s *API) GetNamespace(req *GetNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)

GetNamespace: get a namespace

Get the namespace associated with the given id.

func (*API) IssueJWT

func (s *API) IssueJWT(req *IssueJWTRequest, opts ...scw.RequestOption) (*Token, error)

func (*API) ListCrons

func (s *API) ListCrons(req *ListCronsRequest, opts ...scw.RequestOption) (*ListCronsResponse, error)

ListCrons: list all your crons

func (*API) ListDomains

func (s *API) ListDomains(req *ListDomainsRequest, opts ...scw.RequestOption) (*ListDomainsResponse, error)

func (*API) ListFunctionRuntimes

func (s *API) ListFunctionRuntimes(req *ListFunctionRuntimesRequest, opts ...scw.RequestOption) (*ListFunctionRuntimesResponse, error)

ListFunctionRuntimes: list function runtimes

List available function runtimes.

func (*API) ListFunctions

func (s *API) ListFunctions(req *ListFunctionsRequest, opts ...scw.RequestOption) (*ListFunctionsResponse, error)

ListFunctions: list all your functions

func (*API) ListLogs

func (s *API) ListLogs(req *ListLogsRequest, opts ...scw.RequestOption) (*ListLogsResponse, error)

ListLogs: list your application logs

func (*API) ListNamespaces

func (s *API) ListNamespaces(req *ListNamespacesRequest, opts ...scw.RequestOption) (*ListNamespacesResponse, error)

ListNamespaces: list all your namespaces

func (*API) UpdateCron

func (s *API) UpdateCron(req *UpdateCronRequest, opts ...scw.RequestOption) (*Cron, error)

UpdateCron: update an existing cron

Update the cron associated with the given id.

func (*API) UpdateFunction

func (s *API) UpdateFunction(req *UpdateFunctionRequest, opts ...scw.RequestOption) (*Function, error)

UpdateFunction: update an existing function

Update the function associated with the given id.

func (*API) UpdateNamespace

func (s *API) UpdateNamespace(req *UpdateNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)

UpdateNamespace: update an existing namespace

Update the space associated with the given id.

func (*API) WaitForCron

func (s *API) WaitForCron(req *WaitForCronRequest, opts ...scw.RequestOption) (*Cron, error)

WaitForCron waits for the Cron to be in a ready state before returning.

func (*API) WaitForFunction

func (s *API) WaitForFunction(req *WaitForFunctionRequest, opts ...scw.RequestOption) (*Function, error)

WaitForFunction waits for the Function to be in a ready state before returning.

func (*API) WaitForNamespace

func (s *API) WaitForNamespace(req *WaitForNamespaceRequest, opts ...scw.RequestOption) (*Namespace, error)

WaitForNamespace waits for the Namespace to be in a ready state before returning.

type CreateCronRequest

type CreateCronRequest struct {
	Region scw.Region `json:"-"`

	FunctionID string `json:"function_id"`

	Schedule string `json:"schedule"`

	Args []byte `json:"args"`
}

type CreateDomainRequest

type CreateDomainRequest struct {
	Region scw.Region `json:"-"`

	Hostname string `json:"hostname"`

	FunctionID string `json:"function_id"`
}

type CreateFunctionRequest

type CreateFunctionRequest struct {
	Region scw.Region `json:"-"`

	Name string `json:"name"`

	NamespaceID string `json:"namespace_id"`

	EnvironmentVariables *map[string]string `json:"environment_variables"`

	MinScale *uint32 `json:"min_scale"`

	MaxScale *uint32 `json:"max_scale"`
	// Runtime:
	//
	// Default value: unknown_runtime
	Runtime FunctionRuntime `json:"runtime"`

	MemoryLimit *uint32 `json:"memory_limit"`

	Timeout *scw.Duration `json:"timeout"`

	Handler *string `json:"handler"`
	// Privacy:
	//
	// Default value: unknown_privacy
	Privacy FunctionPrivacy `json:"privacy"`

	Description *string `json:"description"`

	SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
}

type CreateNamespaceRequest

type CreateNamespaceRequest struct {
	Region scw.Region `json:"-"`

	Name string `json:"name"`

	EnvironmentVariables *map[string]string `json:"environment_variables"`

	ProjectID string `json:"project_id"`

	Description *string `json:"description"`

	SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
}

type Cron

type Cron struct {
	ID string `json:"id"`

	FunctionID string `json:"function_id"`

	Schedule string `json:"schedule"`

	Args []byte `json:"args"`
	// Status:
	//
	// Default value: unknown
	Status CronStatus `json:"status"`
}

Cron: cron

type CronStatus

type CronStatus string

func (CronStatus) MarshalJSON

func (enum CronStatus) MarshalJSON() ([]byte, error)

func (CronStatus) String

func (enum CronStatus) String() string

func (*CronStatus) UnmarshalJSON

func (enum *CronStatus) UnmarshalJSON(data []byte) error

type DeleteCronRequest

type DeleteCronRequest struct {
	Region scw.Region `json:"-"`

	CronID string `json:"-"`
}

type DeleteDomainRequest

type DeleteDomainRequest struct {
	Region scw.Region `json:"-"`

	DomainID string `json:"-"`
}

type DeleteFunctionRequest

type DeleteFunctionRequest struct {
	Region scw.Region `json:"-"`

	FunctionID string `json:"-"`
}

type DeleteNamespaceRequest

type DeleteNamespaceRequest struct {
	Region scw.Region `json:"-"`

	NamespaceID string `json:"-"`
}

type DeployFunctionRequest

type DeployFunctionRequest struct {
	Region scw.Region `json:"-"`

	FunctionID string `json:"-"`
}

type Domain

type Domain struct {
	ID string `json:"id"`

	Hostname string `json:"hostname"`

	FunctionID string `json:"function_id"`

	URL string `json:"url"`
	// Status:
	//
	// Default value: unknown
	Status DomainStatus `json:"status"`

	ErrorMessage *string `json:"error_message"`
}

Domain: domain

type DomainStatus

type DomainStatus string

func (DomainStatus) MarshalJSON

func (enum DomainStatus) MarshalJSON() ([]byte, error)

func (DomainStatus) String

func (enum DomainStatus) String() string

func (*DomainStatus) UnmarshalJSON

func (enum *DomainStatus) UnmarshalJSON(data []byte) error

type DownloadURL

type DownloadURL struct {
	URL string `json:"url"`

	Headers map[string]*[]string `json:"headers"`
}

type Function

type Function struct {
	ID string `json:"id"`

	Name string `json:"name"`

	NamespaceID string `json:"namespace_id"`
	// Status:
	//
	// Default value: unknown
	Status FunctionStatus `json:"status"`

	EnvironmentVariables map[string]string `json:"environment_variables"`

	MinScale uint32 `json:"min_scale"`

	MaxScale uint32 `json:"max_scale"`
	// Runtime:
	//
	// Default value: unknown_runtime
	Runtime FunctionRuntime `json:"runtime"`

	MemoryLimit uint32 `json:"memory_limit"`

	CPULimit uint32 `json:"cpu_limit"`

	Timeout *scw.Duration `json:"timeout"`

	Handler string `json:"handler"`

	ErrorMessage *string `json:"error_message"`
	// Privacy:
	//
	// Default value: unknown_privacy
	Privacy FunctionPrivacy `json:"privacy"`

	Description *string `json:"description"`

	SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`

	Region scw.Region `json:"region"`
}

Function: function

type FunctionPrivacy

type FunctionPrivacy string

func (FunctionPrivacy) MarshalJSON

func (enum FunctionPrivacy) MarshalJSON() ([]byte, error)

func (FunctionPrivacy) String

func (enum FunctionPrivacy) String() string

func (*FunctionPrivacy) UnmarshalJSON

func (enum *FunctionPrivacy) UnmarshalJSON(data []byte) error

type FunctionRuntime

type FunctionRuntime string

func (FunctionRuntime) MarshalJSON

func (enum FunctionRuntime) MarshalJSON() ([]byte, error)

func (FunctionRuntime) String

func (enum FunctionRuntime) String() string

func (*FunctionRuntime) UnmarshalJSON

func (enum *FunctionRuntime) UnmarshalJSON(data []byte) error

type FunctionStatus

type FunctionStatus string

func (FunctionStatus) MarshalJSON

func (enum FunctionStatus) MarshalJSON() ([]byte, error)

func (FunctionStatus) String

func (enum FunctionStatus) String() string

func (*FunctionStatus) UnmarshalJSON

func (enum *FunctionStatus) UnmarshalJSON(data []byte) error

type GetCronRequest

type GetCronRequest struct {
	Region scw.Region `json:"-"`

	CronID string `json:"-"`
}

type GetDomainRequest

type GetDomainRequest struct {
	Region scw.Region `json:"-"`

	DomainID string `json:"-"`
}

type GetFunctionDownloadURLRequest

type GetFunctionDownloadURLRequest struct {
	Region scw.Region `json:"-"`

	FunctionID string `json:"-"`
}

type GetFunctionRequest

type GetFunctionRequest struct {
	Region scw.Region `json:"-"`

	FunctionID string `json:"-"`
}

type GetFunctionUploadURLRequest

type GetFunctionUploadURLRequest struct {
	Region scw.Region `json:"-"`

	FunctionID string `json:"-"`

	ContentLength uint64 `json:"-"`
}

type GetNamespaceRequest

type GetNamespaceRequest struct {
	Region scw.Region `json:"-"`

	NamespaceID string `json:"-"`
}

type IssueJWTRequest

type IssueJWTRequest struct {
	Region scw.Region `json:"-"`

	FunctionID *string `json:"-"`

	NamespaceID *string `json:"-"`

	ExpiresAt *time.Time `json:"-"`
}

type ListCronsRequest

type ListCronsRequest struct {
	Region scw.Region `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
	// OrderBy:
	//
	// Default value: created_at_asc
	OrderBy ListCronsRequestOrderBy `json:"-"`

	FunctionID string `json:"-"`
}

type ListCronsRequestOrderBy

type ListCronsRequestOrderBy string

func (ListCronsRequestOrderBy) MarshalJSON

func (enum ListCronsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListCronsRequestOrderBy) String

func (enum ListCronsRequestOrderBy) String() string

func (*ListCronsRequestOrderBy) UnmarshalJSON

func (enum *ListCronsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListCronsResponse

type ListCronsResponse struct {
	Crons []*Cron `json:"crons"`

	TotalCount uint32 `json:"total_count"`
}

ListCronsResponse: list crons response

func (*ListCronsResponse) UnsafeAppend

func (r *ListCronsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListCronsResponse) UnsafeGetTotalCount

func (r *ListCronsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListDomainsRequest

type ListDomainsRequest struct {
	Region scw.Region `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
	// OrderBy:
	//
	// Default value: created_at_asc
	OrderBy ListDomainsRequestOrderBy `json:"-"`

	FunctionID string `json:"-"`
}

type ListDomainsRequestOrderBy

type ListDomainsRequestOrderBy string

func (ListDomainsRequestOrderBy) MarshalJSON

func (enum ListDomainsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListDomainsRequestOrderBy) String

func (enum ListDomainsRequestOrderBy) String() string

func (*ListDomainsRequestOrderBy) UnmarshalJSON

func (enum *ListDomainsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListDomainsResponse

type ListDomainsResponse struct {
	Domains []*Domain `json:"domains"`

	TotalCount uint32 `json:"total_count"`
}

ListDomainsResponse: list domains response

func (*ListDomainsResponse) UnsafeAppend

func (r *ListDomainsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListDomainsResponse) UnsafeGetTotalCount

func (r *ListDomainsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListFunctionRuntimesRequest

type ListFunctionRuntimesRequest struct {
	Region scw.Region `json:"-"`
}

type ListFunctionRuntimesResponse

type ListFunctionRuntimesResponse struct {
	Runtimes []FunctionRuntime `json:"runtimes"`
}

ListFunctionRuntimesResponse: list function runtimes response

type ListFunctionsRequest

type ListFunctionsRequest struct {
	Region scw.Region `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
	// OrderBy:
	//
	// Default value: created_at_asc
	OrderBy ListFunctionsRequestOrderBy `json:"-"`

	NamespaceID string `json:"-"`

	Name *string `json:"-"`

	OrganizationID *string `json:"-"`

	ProjectID *string `json:"-"`
}

type ListFunctionsRequestOrderBy

type ListFunctionsRequestOrderBy string

func (ListFunctionsRequestOrderBy) MarshalJSON

func (enum ListFunctionsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListFunctionsRequestOrderBy) String

func (enum ListFunctionsRequestOrderBy) String() string

func (*ListFunctionsRequestOrderBy) UnmarshalJSON

func (enum *ListFunctionsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListFunctionsResponse

type ListFunctionsResponse struct {
	Functions []*Function `json:"functions"`

	TotalCount uint32 `json:"total_count"`
}

ListFunctionsResponse: list functions response

func (*ListFunctionsResponse) UnsafeAppend

func (r *ListFunctionsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListFunctionsResponse) UnsafeGetTotalCount

func (r *ListFunctionsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListLogsRequest

type ListLogsRequest struct {
	Region scw.Region `json:"-"`

	FunctionID string `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
	// OrderBy:
	//
	// Default value: timestamp_desc
	OrderBy ListLogsRequestOrderBy `json:"-"`
}

type ListLogsRequestOrderBy

type ListLogsRequestOrderBy string

func (ListLogsRequestOrderBy) MarshalJSON

func (enum ListLogsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListLogsRequestOrderBy) String

func (enum ListLogsRequestOrderBy) String() string

func (*ListLogsRequestOrderBy) UnmarshalJSON

func (enum *ListLogsRequestOrderBy) UnmarshalJSON(data []byte) error

type ListLogsResponse

type ListLogsResponse struct {
	Logs []*Log `json:"logs"`

	TotalCount uint32 `json:"total_count"`
}

ListLogsResponse: list logs response

func (*ListLogsResponse) UnsafeAppend

func (r *ListLogsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListLogsResponse) UnsafeGetTotalCount

func (r *ListLogsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListNamespacesRequest

type ListNamespacesRequest struct {
	Region scw.Region `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
	// OrderBy:
	//
	// Default value: created_at_asc
	OrderBy ListNamespacesRequestOrderBy `json:"-"`

	Name *string `json:"-"`

	OrganizationID *string `json:"-"`

	ProjectID *string `json:"-"`
}

type ListNamespacesRequestOrderBy

type ListNamespacesRequestOrderBy string

func (ListNamespacesRequestOrderBy) MarshalJSON

func (enum ListNamespacesRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListNamespacesRequestOrderBy) String

func (enum ListNamespacesRequestOrderBy) String() string

func (*ListNamespacesRequestOrderBy) UnmarshalJSON

func (enum *ListNamespacesRequestOrderBy) UnmarshalJSON(data []byte) error

type ListNamespacesResponse

type ListNamespacesResponse struct {
	Namespaces []*Namespace `json:"namespaces"`

	TotalCount uint32 `json:"total_count"`
}

ListNamespacesResponse: list namespaces response

func (*ListNamespacesResponse) UnsafeAppend

func (r *ListNamespacesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListNamespacesResponse) UnsafeGetTotalCount

func (r *ListNamespacesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type Log

type Log struct {
	Message string `json:"message"`

	Timestamp *time.Time `json:"timestamp"`

	ID string `json:"id"`
}

Log: log

type Namespace

type Namespace struct {
	ID string `json:"id"`

	Name string `json:"name"`

	EnvironmentVariables map[string]string `json:"environment_variables"`

	OrganizationID string `json:"organization_id"`

	ProjectID string `json:"project_id"`
	// Status:
	//
	// Default value: unknown
	Status NamespaceStatus `json:"status"`

	RegistryNamespaceID string `json:"registry_namespace_id"`

	ErrorMessage *string `json:"error_message"`

	RegistryEndpoint string `json:"registry_endpoint"`

	Description *string `json:"description"`

	SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`

	Region scw.Region `json:"region"`
}

Namespace: namespace

type NamespaceStatus

type NamespaceStatus string

func (NamespaceStatus) MarshalJSON

func (enum NamespaceStatus) MarshalJSON() ([]byte, error)

func (NamespaceStatus) String

func (enum NamespaceStatus) String() string

func (*NamespaceStatus) UnmarshalJSON

func (enum *NamespaceStatus) UnmarshalJSON(data []byte) error

type NullValue

type NullValue string

func (NullValue) MarshalJSON

func (enum NullValue) MarshalJSON() ([]byte, error)

func (NullValue) String

func (enum NullValue) String() string

func (*NullValue) UnmarshalJSON

func (enum *NullValue) UnmarshalJSON(data []byte) error

type Secret

type Secret struct {
	Key string `json:"key"`

	Value *string `json:"value"`
}

type Token

type Token struct {
	Token string `json:"token"`

	PublicKey string `json:"public_key"`
}

type UpdateCronRequest

type UpdateCronRequest struct {
	Region scw.Region `json:"-"`

	CronID string `json:"-"`

	FunctionID *string `json:"function_id"`

	Schedule *string `json:"schedule"`

	Args []byte `json:"args"`
}

type UpdateFunctionRequest

type UpdateFunctionRequest struct {
	Region scw.Region `json:"-"`

	FunctionID string `json:"-"`

	EnvironmentVariables *map[string]string `json:"environment_variables"`

	MinScale *uint32 `json:"min_scale"`

	MaxScale *uint32 `json:"max_scale"`

	MemoryLimit *uint32 `json:"memory_limit"`

	Timeout *scw.Duration `json:"timeout"`

	Redeploy *bool `json:"redeploy"`

	Handler *string `json:"handler"`
	// Privacy:
	//
	// Default value: unknown_privacy
	Privacy FunctionPrivacy `json:"privacy"`

	Description *string `json:"description"`

	SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
}

type UpdateNamespaceRequest

type UpdateNamespaceRequest struct {
	Region scw.Region `json:"-"`

	NamespaceID string `json:"-"`

	EnvironmentVariables *map[string]string `json:"environment_variables"`

	Description *string `json:"description"`

	SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"`
}

type UploadURL

type UploadURL struct {
	URL string `json:"url"`

	Headers map[string]*[]string `json:"headers"`
}

UploadURL: upload url

type WaitForCronRequest

type WaitForCronRequest struct {
	CronID        string
	Region        scw.Region
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForCronRequest is used by WaitForNamespace method.

type WaitForFunctionRequest

type WaitForFunctionRequest struct {
	FunctionID    string
	Region        scw.Region
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForFunctionRequest is used by WaitForNamespace method.

type WaitForNamespaceRequest

type WaitForNamespaceRequest struct {
	NamespaceID   string
	Region        scw.Region
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForNamespaceRequest is used by WaitForNamespace method.

Jump to

Keyboard shortcuts

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