functions

package
v0.0.0-...-a3be206 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

View Source
const (
	NamespaceTypeCFBased     = 1
	NamespaceTypeIamMigrated = 2
	NamespaceTypeIamBased    = 3

	DefaultServiceURL  = "https://gateway.watsonplatform.net/servicebroker/API/v1"
	DefaultServiceName = "ibm_cloud_functions_namespace_API"
)

const ..

View Source
const ErrCodeAPICreation = "APICreationError"

ErrCodeAPICreation ...

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateNamespaceOptions

type CreateNamespaceOptions struct {

	// Name.
	Name *string `json:"name" validate:"required"`

	// Resourcegroupid of resource group the namespace resource should be placed in. Use 'ibmcloud resource groups' to
	// query your resources groups and their ids.
	ResourceGroupID *string `json:"resource_group_id" validate:"required"`

	// Resourceplanid to use, e.g. 'functions-base-plan'.
	ResourcePlanID *string `json:"resource_plan_id" validate:"required"`

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

	// Allows users to set headers to be GDPR compliant
	Headers map[string]string
}

CreateNamespaceOptions : The CreateNamespace options.

type DeleteNamespaceOptions

type DeleteNamespaceOptions struct {

	// The id of the namespace to delete.
	ID *string `json:"id" validate:"required"`

	// Allows users to set headers to be GDPR compliant
	Headers map[string]string
}

DeleteNamespaceOptions : The DeleteNamespace options.

type FunctionServiceAPI

type FunctionServiceAPI interface {
	Namespaces() Functions
}

FunctionServiceAPI ..

func New

New ...

func NewCF

func NewCF(sess *session.Session) (FunctionServiceAPI, error)

NewCF ...

type Functions

type Functions interface {
	GetCloudFoundaryNamespaces() (NamespaceResponseList, error)
	DeleteNamespace(namespaceID string) (NamespaceResponse, error)
	CreateNamespace(CreateNamespaceOptions) (NamespaceResponse, error)
	GetNamespaces() (NamespaceResponseList, error)
	GetNamespace(payload GetNamespaceOptions) (NamespaceResponse, error)
	UpdateNamespace(payload UpdateNamespaceOptions) (NamespaceResponse, error)
}

Functions ..

type GetNamespaceOptions

type GetNamespaceOptions struct {

	// The id of the namespace to retrieve.
	ID *string `json:"id" validate:"required"`

	// Allows users to set headers to be GDPR compliant
	Headers map[string]string
}

GetNamespaceOptions : The GetNamespace options.

type GetNamespacesOptions

type GetNamespacesOptions struct {

	// The maximum number of namespaces to return. Default 100. Maximum 200.
	Limit *int64 `json:"limit,omitempty"`

	// The number of namespaces to skip. Default 0.
	Offset *int64 `json:"offset,omitempty"`

	// Allows users to set headers to be GDPR compliant
	Headers map[string]string
}

GetNamespacesOptions : The GetNamespaces options.

type NamespaceResource

type NamespaceResource interface {
	GetID() string
	GetLocation() string
	GetName() string
	GetUUID() string
	GetKey() string
	IsIamEnabled() bool
	IsCf() bool
}

NamespaceResource ..

type NamespaceResponse

type NamespaceResponse struct {

	// Time the API key was activated.
	APIKeyCreated *strfmt.DateTime `json:"API_key_created,omitempty"`

	// ID of API key used by the namespace.
	APIKeyID *string `json:"API_key_id,omitempty"`

	// CF space GUID of classic namespace - present if it is or was a classic namespace.
	ClassicSpaceguid *string `json:"classic_spaceguid,omitempty"`

	// ClassicType <br/> This attribute will be absent for an IAM namespace, a namespace which is IAM-enabled and not
	// associated with any CF space. <br/> 1 : Classic - A namespace which is associated with a CF space.  <br/> Such
	// namespace is NOT IAM-enabled and can only be used by using the legacy API key ('entitlement key'). <br/> 2 : Classic
	// IAM enabled - A namespace which is associated with a CF space and which is IAM-enabled.  <br/> It accepts IMA token
	// and legacy API key ('entitlement key') for authorization.<br/> 3 : IAM migration complete - A namespace which was/is
	// associated with a CF space, which is IAM-enabled.  <br/> It accepts only an IAM token for authorization.<br/>.
	ClassicType *int64 `json:"classic_type,omitempty"`

	// CRN of namespace - absent if namespace is NOT IAM-enabled.
	Crn *string `json:"crn,omitempty"`

	// Description - absent if namespace is NOT IAM-enabled.
	Description *string `json:"description,omitempty"`

	// UUID of namespace.
	ID *string `json:"id" validate:"required"`

	// Location of the resource.
	Location *string `json:"location" validate:"required"`

	// Name - absent if namespace is NOT IAM-enabled.
	Name *string `json:"name,omitempty"`

	// Resourceplanid used - absent if namespace is NOT IAM-enabled.
	ResourcePlanID *string `json:"resource_plan_id,omitempty"`

	// Resourcegrpid used - absent if namespace is NOT IAM-enabled.
	ResourceGroupID *string `json:"resource_group_id,omitempty"`

	// Serviceid used by the namespace - absent if namespace is NOT IAM-enabled.
	ServiceID *string `json:"service_id,omitempty"`

	// Key used by the cf based namespace.
	Key string `json:"key,omitempty"`

	// UUID used by the cf based namespace.
	UUID string `json:"uuid,omitempty"`
}

NamespaceResponse : NamespaceResponse - create/get response.

func (*NamespaceResponse) GetID

func (ns *NamespaceResponse) GetID() string

GetID ..

func (*NamespaceResponse) GetKey

func (ns *NamespaceResponse) GetKey() string

GetKey ..

func (*NamespaceResponse) GetLocation

func (ns *NamespaceResponse) GetLocation() string

GetLocation ..

func (*NamespaceResponse) GetName

func (ns *NamespaceResponse) GetName() string

GetName ..

func (*NamespaceResponse) GetUUID

func (ns *NamespaceResponse) GetUUID() string

GetUUID ..

func (*NamespaceResponse) IsCf

func (ns *NamespaceResponse) IsCf() bool

IsCf ..

func (*NamespaceResponse) IsIamEnabled

func (ns *NamespaceResponse) IsIamEnabled() bool

IsIamEnabled ..

func (*NamespaceResponse) IsMigrated

func (ns *NamespaceResponse) IsMigrated() bool

IsMigrated ..

type NamespaceResponseList

type NamespaceResponseList struct {

	// Maximum number of namespaces to return.
	Limit *int64 `json:"limit" validate:"required"`

	// List of namespaces.
	Namespaces []NamespaceResponse `json:"namespaces" validate:"required"`

	// Number of namespaces to skip.
	Offset *int64 `json:"offset" validate:"required"`

	// Total number of namespaces available.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

NamespaceResponseList : NamespaceResponseList -.

type UpdateNamespaceOptions

type UpdateNamespaceOptions struct {

	// The id of the namespace to update.
	ID *string `json:"id" validate:"required"`

	// New description.
	Description *string `json:"description,omitempty"`

	// New name.
	Name *string `json:"name,omitempty"`

	// Allows users to set headers to be GDPR compliant
	Headers map[string]string
}

UpdateNamespaceOptions : The UpdateNamespace options.

Jump to

Keyboard shortcuts

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