models

package
v0.0.0-...-9e96525 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 125

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	UUID       string `json:"uuid,omitempty"`
	Version    string `json:"version,omitempty"`
	Crn        string `json:"crn,omitempty"`
	CreatedAt  string `json:"createdAt,omitempty"`
	ModifiedAt string `json:"modifiedAt,omitempty"`

	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	Format       string `json:"format,omitempty"`
	BoundTo      string `json:"boundTo,omitempty"`
	APIKey       string `json:"apiKey,omitempty"`
	APIKeyID     string `json:"apiKeyId,omitempty"`
	APIKeySecret string `json:"apiKeySecret,omitempty"`
	Locked       bool   `json:"locked,omitempty"`
}

type AccessGroup

type AccessGroup struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

AccessGroup represents the access group of IAM UUM

type AccessGroupMember

type AccessGroupMember struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

type AccessGroupMemberV2

type AccessGroupMemberV2 struct {
	ID          string `json:"iam_id,omitempty"`
	Type        string `json:"type,omitempty"`
	Href        string `json:"href,omitempty"`
	Name        string `json:"name,omitempty"`
	Email       string `json:"email,omitempty"`
	CreatedAt   string `json:"created_at,omitempty"`
	CreatedByID string `json:"created_by_id,omitempty"`
}

type AccessGroupV2

type AccessGroupV2 struct {
	AccessGroup
	AccountID        string `json:"account_id,omitempty"`
	CreatedAt        string `json:"created_at,omitempty"`
	CreatedByID      string `json:"created_by_id,omitempty"`
	LastModifiedAt   string `json:"last_modified_at,omitempty"`
	LastModifiedByID string `json:"last_modified_by_id,omitempty"`
}

type AccountEntity

type AccountEntity struct {
	BillingCountryCode   string                `json:"billing_country_code"`
	BluemixSubscriptions []BluemixSubscription `json:"bluemix_subscriptions"`
	ConfigurationID      *string               `json:"configuration_id"` // Using pointer to handle null
	CountryCode          string                `json:"country_code"`
	CurrencyCode         string                `json:"currency_code"`
	CurrentBillingSystem string                `json:"current_billing_system"`
	CustomerID           string                `json:"customer_id"`
	IsIBMer              bool                  `json:"isIBMer"`
	Linkages             []AccountLinkage      `json:"linkages"`
	Name                 string                `json:"name"`
	OfferTemplate        string                `json:"offer_template"`
	Onboarded            int                   `json:"onboarded"`
	OrganizationsRegion  []OrganizationsRegion `json:"organizations_region"`
	Origin               string                `json:"origin"`
	Owner                string                `json:"owner"`
	OwnerIAMID           string                `json:"owner_iam_id"`
	OwnerUniqueID        string                `json:"owner_unique_id"`
	OwnerUserID          string                `json:"owner_userid"`
	State                string                `json:"state"`
	SubscriptionID       string                `json:"subscription_id"`
	Tags                 []interface{}         `json:"tags"` // Using interface{} since type is not specified
	TeamDirectoryEnabled bool                  `json:"team_directory_enabled"`
	TermsAndConditions   TermsAndConditions    `json:"terms_and_conditions"`
	Type                 string                `json:"type"`
}

type AccountLinkage

type AccountLinkage struct {
	Origin string `json:"origin"`
	State  string `json:"state"`
}

type AccountOrganization

type AccountOrganization struct {
	GUID   string `json:"guid"`
	Region string `json:"region"`
}

type AccountUser

type AccountUser struct {
	UserId      string `json:"userId"`
	FirstName   string `json:"firstname"`
	LastName    string `json:"lastname"`
	State       string `json:"state"`
	IbmUniqueId string `json:"ibmUniqueId"`
	Email       string `json:"email"`
	Phonenumber string `json:"phonenumber"`
	Id          string `json:"id"`
	UaaGuid     string `json:"uaaGuid"`
	AccountId   string `json:"accountId"`
	Role        string `json:"role"`
	AddedOn     string `json:"added_on"`
	InvitedOn   string `json:"invitedOn"`
	Photo       string `json:"photo"`
}

type BluemixSubscription

type BluemixSubscription struct {
	BillToContact         string        `json:"bill_to_contact"`
	BillingSystem         string        `json:"billing_system"`
	CatalogID             string        `json:"catalog_id"`
	CurrentStateTimestamp time.Time     `json:"current_state_timestamp"`
	DistributionChannel   string        `json:"distribution_channel"`
	History               []History     `json:"history"`
	OrderID               string        `json:"order_id"`
	PartNumber            string        `json:"part_number"`
	PaygPendingTimestamp  time.Time     `json:"payg_pending_timestamp"`
	PaymentMethod         PaymentMethod `json:"payment_method"`
	SoftlayerAccountID    string        `json:"softlayer_account_id"`
	SoldToContact         string        `json:"sold_to_contact"`
	State                 string        `json:"state"`
	SubscriptionTags      []interface{} `json:"subscriptionTags"`
	SubscriptionID        string        `json:"subscription_id"`
	Type                  string        `json:"type"`
}

type CertificateDelete

type CertificateDelete struct {
	Message string
}

CertificateDelete struct for cert-delete success response.

type CertificateGetData

type CertificateGetData struct {
	ID           string                  `json:"_id"`
	Name         string                  `json:"name"`
	Description  string                  `json:"description"`
	Domains      []string                `json:"domains"`
	Status       string                  `json:"status"`
	Issuer       string                  `json:"issuer"`
	BeginsOn     int64                   `json:"begins_on"`
	ExpiresOn    int64                   `json:"expires_on"`
	Algorithm    string                  `json:"algorithm"`
	KeyAlgorithm string                  `json:"key_algorithm"`
	Imported     bool                    `json:"imported"`
	HasPrevious  bool                    `json:"has_previous"`
	IssuanceInfo CertificateIssuanceInfo `json:"issuance_info"`
	Data         *Data                   `json:"data"`
	DataKeyID    string                  `json:"data_key_id"`
}

CertificateGetData ...

type CertificateImportData

type CertificateImportData struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Data        Data   `json:"data"`
}

CertificateImportData struct for holding user-provided certificates and keys for cert-import.

type CertificateInfo

type CertificateInfo struct {
	ID           string                   `json:"_id"`
	Name         string                   `json:"name"`
	Description  string                   `json:"description"`
	Domains      []string                 `json:"domains"`
	RotateKeys   bool                     `json:"rotate_keys"`
	Status       string                   `json:"status"`
	Issuer       string                   `json:"issuer"`
	BeginsOn     int64                    `json:"begins_on"`
	ExpiresOn    int64                    `json:"expires_on"`
	Algorithm    string                   `json:"algorithm"`
	KeyAlgorithm string                   `json:"key_algorithm"`
	Imported     bool                     `json:"imported"`
	HasPrevious  bool                     `json:"has_previous"`
	IssuanceInfo *CertificateIssuanceInfo `json:"issuance_info"`
	SerialNumber string                   `json:"serial_number,omitempty"`
	OrderPolicy  OrderPolicy              `json:"order_policy,omitempty"`
}

CertificateInfo struct for cert-import & cert-reimport success response.

type CertificateIssuanceInfo

type CertificateIssuanceInfo struct {
	Status         string `json:"status"`
	Code           string `json:"code"`
	AdditionalInfo string `json:"additional_info"`
	Auto           bool   `json:"auto"`
	OrderedOn      int64  `json:"ordered_on"`
}

CertificateIssuanceInfo struct

type CertificateMetadataUpdate

type CertificateMetadataUpdate struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

CertificateMetadataUpdate struct for cert-metadata-update's request body.

type CertificateOrderData

type CertificateOrderData struct {
	Name                   string   `json:"name"`
	Description            string   `json:"description,omitempty"`
	Domains                []string `json:"domains"`
	DomainValidationMethod string   `json:"domain_validation_method"`
	DNSProviderInstanceCrn string   `json:"dns_provider_instance_crn,omitempty"`
	Issuer                 string   `json:"issuer,omitempty"`
	Algorithm              string   `json:"algorithm,omitempty"`
	KeyAlgorithm           string   `json:"key_algorithm,omitempty"`
	AutoRenewEnabled       bool     `json:"auto_renew_enabled,omitempty"`
}

CertificateOrderData struct for holding user-provided order data for cert-order.

type CertificateReimportData

type CertificateReimportData struct {
	Content                 string `json:"content"`
	Privatekey              string `json:"priv_key,omitempty"`
	IntermediateCertificate string `json:"intermediate,omitempty"`
}

CertificateReimportData struct for holding user-provided certificates and keys for cert-reimport.

type CertificateRenewData

type CertificateRenewData struct {
	RotateKeys bool `json:"rotate_keys"`
}

CertificateRenewData struct for holding user-provided renew data for cert-renew.

type CertificatesInfo

type CertificatesInfo struct {
	CertificateList []CertificateInfo `json:"certificates"`
}

CertificatesInfo List of certificates

type Customer

type Customer struct {
	Name        string
	DisplayName string `json:"display_name"`
}

type Data

type Data struct {
	Content                 string `json:"content"`
	Privatekey              string `json:"priv_key,omitempty"`
	IntermediateCertificate string `json:"intermediate,omitempty"`
}

Data of Imported Certificate

type Deployment

type Deployment struct {
	Name        string
	DisplayName string `json:"display_name"`
}

type DeploymentMetaData

type DeploymentMetaData struct {
	RCCompatible  bool                       `json:"rc_compatible"`
	IAMCompatible bool                       `json:"iam_compatible"`
	Deployment    MetadataDeploymentFragment `json:"deployment,omitempty"`
	Service       MetadataServiceFragment    `json:"service,omitempty"`
}

type Geolocation

type Geolocation struct {
	Name        string
	DisplayName string `json:"display_name"`
}

type History

type History struct {
	BillingCountryCode string    `json:"billingCountryCode"`
	BillingSystem      string    `json:"billingSystem"`
	CountryCode        string    `json:"countryCode"`
	CurrencyCode       string    `json:"currencyCode"`
	EndTime            time.Time `json:"endTime"`
	StartTime          time.Time `json:"startTime"`
	State              string    `json:"state"`
	Type               string    `json:"type"`
	BillToContact      *string   `json:"billToContact,omitempty"`
	OrderId            *string   `json:"orderId,omitempty"`
	PaymentMethodType  *string   `json:"paymentMethodType,omitempty"`
	SoldToContact      *string   `json:"soldToContact,omitempty"`
	StateEndComments   *string   `json:"stateEndComments,omitempty"`
	StateEndedBy       *string   `json:"stateEndedBy,omitempty"`
	WalletId           *string   `json:"walletId,omitempty"`
}

type LastOperationType

type LastOperationType struct {
	Type        string     `json:"type"`
	State       string     `json:"state"`
	Description *string    `json:"description"`
	UpdatedAt   *time.Time `json:"updated_at"`
}

type Linkage

type Linkage struct {
	ResourceID     string         `json:"resource_id"`
	ResourceOrigin ResourceOrigin `json:"resource_origin"`
}

type Metadata

type Metadata struct {
	CreatedAt      time.Time `json:"created_at"`
	GUID           string    `json:"guid"`
	UpdateComments string    `json:"update_comments"`
	UpdatedAt      time.Time `json:"updated_at"`
	UpdatedBy      string    `json:"updated_by"`
	URL            string    `json:"url"`
}

type MetadataDeploymentFragment

type MetadataDeploymentFragment struct {
	DeploymentID string  `json:"deployment_id,omitempty"`
	TargetCrn    crn.CRN `json:"target_crn"`
	Location     string  `json:"location"`
}

type MetadataServiceFragment

type MetadataServiceFragment struct {
	Bindable            bool   `json:"bindable"`
	IAMCompatible       bool   `json:"iam_compatible"`
	RCProvisionable     bool   `json:"rc_provisionable"`
	PlanUpdateable      bool   `json:"plan_updateable"`
	ServiceCheckEnabled bool   `json:"service_check_enabled"`
	ServiceKeySupported bool   `json:"service_key_supported"`
	State               string `json:"state"`
	TestCheckInterval   int    `json:"test_check_interval"`
	UniqueAPIKey        bool   `json:"unique_api_key"`

	// CF properties
	ServiceBrokerGUID string `json:"service_broker_guid"`
}

type MetadataType

type MetadataType struct {
	ID        string     `json:"id"`
	Guid      string     `json:"guid"`
	Url       string     `json:"url"`
	CreatedAt *time.Time `json:"created_at"`
	UpdatedAt *time.Time `json:"updated_at"`
	DeletedAt *time.Time `json:"deleted_at"`
}

type OrderPolicy

type OrderPolicy struct {
	Name             string `json:"name,omitempty"`
	AutoRenewEnabled bool   `json:"auto_renew_enabled,omitempty"`
}

OrderPolicy ...

type OrganizationsRegion

type OrganizationsRegion struct {
	GUID   string `json:"guid"`
	Region string `json:"region"`
}

type PaymentMethod

type PaymentMethod struct {
	Ended    *string   `json:"ended"` // Using pointer to handle null
	Started  time.Time `json:"started"`
	Type     string    `json:"type"`
	WalletID string    `json:"wallet_id"`
}

type PlanHistoryData

type PlanHistoryData struct {
	ResourcePlanID string    `json:"resource_plan_id"`
	StartDate      time.Time `json:"start_date"`
	RequestorID    string    `json:"requestor_id"`
	Migrated       bool      `json:"migrated"`
	ControlledBy   string    `json:"controlled_by"`
	Locked         bool      `json:"locked"`
}

type PlatformServiceResourceMetadata

type PlatformServiceResourceMetadata struct {
}

type Policy

type Policy struct {
	ID        string           `json:"id,omitempty"`
	Roles     []PolicyRole     `json:"roles"`
	Resources []PolicyResource `json:"resources"`
	Version   string           `json:"-"`
}

type PolicyResource

type PolicyResource struct {
	ServiceName     string `json:"serviceName,omitempty"`
	ServiceInstance string `json:"serviceInstance,omitempty"`
	Region          string `json:"region,omitempty"`
	ResourceType    string `json:"resourceType,omitempty"`
	Resource        string `json:"resource,omitempty"`
	SpaceID         string `json:"spaceId,omitempty"`
	AccountID       string `json:"accountId,omitempty"`
	OrganizationID  string `json:"organizationId,omitempty"`
	ResourceGroupID string `json:"resourceGroupId,omitempty"`
	AccessGroupID   string `json:"accessGroupId,omitempty"`
}

type PolicyRole

type PolicyRole struct {
	ID          crn.CRN      `json:"id"`
	DisplayName string       `json:"displayName"`
	Description string       `json:"description"`
	Actions     []RoleAction `json:"actions,omitempty"`
}

type QuotaDefinition

type QuotaDefinition struct {
	ID                        string         `json:"_id,omitempty"`
	Revision                  string         `json:"_rev,omitempty"`
	Name                      string         `json:"name,omitmempty"`
	Type                      string         `json:"type,omitempty"`
	ServiceInstanceCountLimit int            `json:"number_of_service_instances,omitempty"`
	AppCountLimit             int            `json:"number_of_apps,omitempty"`
	AppInstanceCountLimit     int            `json:"instances_per_app,omitempty"`
	AppInstanceMemoryLimit    string         `json:"instance_memory,omitempty"`
	TotalAppMemoryLimit       string         `json:"total_app_memory,omitempty"`
	VSICountLimit             int            `json:"vsi_limit,omitempty"`
	ServiceQuotas             []ServiceQuota `json:"service_quotas,omitempty"`
	CreatedAt                 string         `json:"created_at,omitempty"`
	UpdatedAt                 string         `json:"updated_at,omitempty"`
}

type Region

type Region struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	DisplayName     string `json:"display_name"`
	Domain          string `json:"domain"`
	APIEndpoint     string `json:"cf_api"`
	ConsoleEndpoint string `json:"console_url"`
	MCCPEndpoint    string `json:"mccp_api"`
	Type            string `json:"type"`
	Geolocation     `json:"geo"`
	Customer        `json:"customer"`
	Deployment      `json:"deployment"`
	IsHome          bool `json:"home"`
}

type ResourceGroup

type ResourceGroup struct {
	ID              string    `json:"id,omitempty"`
	AccountID       string    `json:"account_id,omitempty"`
	Name            string    `json:"name,omitempty"`
	Default         bool      `json:"default,omitempty"`
	State           string    `json:"state,omitempty"`
	QuotaID         string    `json:"quota_id,omitempty"`
	PaymentMethodID string    `json:"payment_method_id,omitempty"`
	Linkages        []Linkage `json:"resource_linkages,omitempty"`
	CreatedAt       string    `json:"created_at,omitempty"`
	UpdatedAt       string    `json:"updated_at,omitempty"`
}

type ResourceGroupv2

type ResourceGroupv2 struct {
	ResourceGroup
	CRN               string `json:"crn,omitempty"`
	QuotaURL          string `json:"quota_url,omitempty"`
	PaymentMethodsUrl string `json:"payment_methods_url,omitempty"`
	TeamsURL          string `json:"teams_url,omitempty"`
}

type ResourceOrigin

type ResourceOrigin string

func (ResourceOrigin) String

func (o ResourceOrigin) String() string

type Role

type Role struct {
	CRN         crn.CRN `json:"crn"`
	Name        string  `json:"displayName"`
	Description string  `json:"description"`
}

func (Role) ToPolicyRole

func (r Role) ToPolicyRole() PolicyRole

type RoleAction

type RoleAction struct {
	ID          string `json:"id"`
	Name        string `json:"displayName"`
	Description string `json:"description"`
}

type RuntimeResourceMetadata

type RuntimeResourceMetadata struct {
}

type Service

type Service struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	CatalogCRN string `json:"catalog_crn"`
	URL        string `json:"url"`
	Kind       string `json:"kind"`

	Metadata ServiceMetadata `json:"-"`
	Children []Service       `json:"children"`
	Active   bool            `json:"active"`
}

func (*Service) UnmarshalJSON

func (s *Service) UnmarshalJSON(data []byte) error

UnmarshalJSON provide custom JSON unmarshal behavior to support multiple types of `metadata`

type ServiceAlias

type ServiceAlias struct {
	ID                string                 `json:"id"`
	Name              string                 `json:"name"`
	ServiceInstanceID string                 `json:"resource_instance_id"`
	ScopeCRN          crn.CRN                `json:"scope_crn"`
	CRN               crn.CRN                `json:"crn"`
	Tags              []string               `json:"tags,omitempty"`
	Parameters        map[string]interface{} `json:"parameters,omitempty"` // TODO: check whether the response contains the field
	State             string                 `json:"state"`
}

func (ServiceAlias) ScopeSpaceID

func (a ServiceAlias) ScopeSpaceID() string

type ServiceBinding

type ServiceBinding struct {
	*MetadataType
	SourceCrn         crn.CRN                `json:"source_crn"`
	TargetCrn         crn.CRN                `json:"target_crn"`
	Parameters        map[string]interface{} `json:"parameters,omitempty"`
	Crn               crn.CRN                `json:"crn"`
	RegionBindingID   string                 `json:"region_binding_id"`
	AccountID         string                 `json:"account_id"`
	State             string                 `json:"state"`
	Credentials       map[string]interface{} `json:"credentials"`
	ServiceAliasesUrl string                 `json:"resource_aliases_url"`
	TargetName        string
}

type ServiceDeployment

type ServiceDeployment struct {
	ID         string             `json:"id"`
	Name       string             `json:"name"`
	CatalogCRN string             `json:"catalog_crn"`
	Metadata   DeploymentMetaData `json:"metadata,omitempty"`
}

type ServiceDeploymentAlias

type ServiceDeploymentAlias struct {
	Metadata DeploymentMetaData `json:"metadata,omitempty"`
}

type ServiceID

type ServiceID struct {
	UUID        string `json:"uuid,omitempty"`
	IAMID       string `json:"iam_id,omitempty"`
	CRN         string `json:"crn,omitempty"`
	Version     string `json:"version,omitempty"`
	BoundTo     string `json:"boundTo,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	CreatedAt   string `json:"createdAt,omitempty"`
	ModifiedAt  string `json:"modifiedAt,omitempty"`
	Locked      bool   `json:"locked,omitempty"`
}

type ServiceInstance

type ServiceInstance struct {
	*MetadataType
	Name                string `json:"name"`
	RegionID            string `json:"region_id"`
	AccountID           string `json:"account_id"`
	ServicePlanID       string `json:"resource_plan_id"`
	ServicePlanName     string
	ResourceGroupID     string `json:"resource_group_id"`
	ResourceGroupName   string
	Crn                 crn.CRN                `json:"crn,omitempty"`
	Tags                []string               `json:"tags,omitempty"`
	Parameters          map[string]interface{} `json:"parameters,omitempty"`
	Extensions          map[string]interface{} `json:"extensions,omitempty"`
	CreateTime          int64                  `json:"create_time"`
	State               string                 `json:"state"`
	Type                string                 `json:"type"`
	ServiceID           string                 `json:"resource_id"`
	ServiceName         string
	DashboardUrl        *string            `json:"dashboard_url"`
	LastOperation       *LastOperationType `json:"last_operation"`
	AccountUrl          string             `json:"account_url"`
	ResourcePlanUrl     string             `json:"resource_plan_url"`
	ResourceBindingsUrl string             `json:"resource_bindings_url"`
	ResourceAliasesUrl  string             `json:"resource_aliases_url"`
	SiblingsUrl         string             `json:"siblings_url"`
	TargetCrn           crn.CRN            `json:"target_crn"`
}

type ServiceInstanceV2

type ServiceInstanceV2 struct {
	ServiceInstance
	ScheduledReclaimAt interface{}       `json:"scheduled_reclaim_at"`
	RestoredAt         interface{}       `json:"restored_at"`
	ScheduledReclaimBy string            `json:"scheduled_reclaim_by"`
	RestoredBy         string            `json:"restored_by"`
	ResourcePlanID     string            `json:"resource_plan_id"`
	ResourceGroupCrn   string            `json:"resource_group_crn"`
	AllowCleanup       bool              `json:"allow_cleanup"`
	ResourceKeysURL    string            `json:"resource_keys_url"`
	PlanHistory        []PlanHistoryData `json:"plan_history"`
}

type ServiceKey

type ServiceKey struct {
	MetadataType
	Name        string                 `json:"name"`
	SourceCrn   crn.CRN                `json:"source_crn"`
	Parameters  map[string]interface{} `json:"parameters,omitempty"`
	Crn         crn.CRN                `json:"crn"`
	State       string                 `json:"state"`
	AccountID   string                 `json:"account_id"`
	Credentials map[string]interface{} `json:"credentials"`
}

type ServiceMetadata

type ServiceMetadata interface{}

type ServicePlan

type ServicePlan struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	CatalogCRN string `json:"catalog_crn"`
	URL        string `json:"url"`
	Kind       string `json:"kind"`
}

type ServiceQuota

type ServiceQuota struct {
	ID        string `json:"_id,omitempty"`
	ServiceID string `json:"service_id,omitempty"`
	Limit     int    `json:"limit,omitempty"`
}

type ServiceResourceMetadata

type ServiceResourceMetadata struct {
	Service MetadataServiceFragment `json:"service"`
}

type TemplateResourceMetadata

type TemplateResourceMetadata struct {
}

type TermsAndConditions

type TermsAndConditions struct {
	Accepted  bool      `json:"accepted"`
	Required  bool      `json:"required"`
	Timestamp time.Time `json:"timestamp"`
}

type V1Account

type V1Account struct {
	Metadata Metadata      `json:"metadata"`
	Entity   AccountEntity `json:"entity"`
}

type V2Account

type V2Account struct {
	Guid          string
	Name          string
	Type          string
	State         string
	OwnerIamId    string
	CountryCode   string
	Organizations []AccountOrganization
}

Jump to

Keyboard shortcuts

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