Documentation ¶
Index ¶
- Constants
- Variables
- func GetEnvironment(env string) (map[string]string, error)
- func ListEnvironments() (keys []string)
- type Client
- func (c *Client) CreateServiceInstance(instanceName, serviceName, servicePlan, resourceGrp, region string) (string, error)
- func (c *Client) DeleteServiceInstance(instanceID string, recursive bool) error
- func (c *Client) GetResourceKeys(instanceID string) ([]models.ServiceKey, error)
- func (c *Client) ListServiceInstances(serviceType string) (map[string]string, error)
- type CreateResourceKeyOptions
- type PVMClient
- type ResourceControllerV2
- func (resourceController *ResourceControllerV2) CreateResourceKey(createResourceKeyOptions *CreateResourceKeyOptions) (result *rcv2.ResourceKey, response *core.DetailedResponse, err error)
- func (resourceController *ResourceControllerV2) CreateResourceKeyWithContext(ctx context.Context, createResourceKeyOptions *CreateResourceKeyOptions) (result *rcv2.ResourceKey, response *core.DetailedResponse, err error)
- func (resourceController *ResourceControllerV2) ListResourceKeysBySourceCrn(name, sourceCrn string) (keys []rcv2.ResourceKey, err error)
- type S3Client
- type User
Constants ¶
View Source
const (
AuthEndpoint = "https://iam.cloud.ibm.com/identity/token"
)
View Source
const DefaultEnv = "prod"
Variables ¶
View Source
var EnvironmentNotFound = errors.New("environment not found")
View Source
var Environments = map[string]map[string]string{
"test": {
"TPEndpoint": "https://iam.test.cloud.ibm.com",
"RCEndpoint": "https://resource-controller.test.cloud.ibm.com",
"PIEndpoint": "power-iaas.test.cloud.ibm.com",
},
"prod": {
"TPEndpoint": "https://iam.cloud.ibm.com",
"RCEndpoint": "https://resource-controller.cloud.ibm.com",
"PIEndpoint": "power-iaas.cloud.ibm.com",
},
}
Functions ¶
func ListEnvironments ¶
func ListEnvironments() (keys []string)
Types ¶
type Client ¶
type Client struct { *bxsession.Session User *User ResourceClientV2 controllerv2.ResourceServiceInstanceRepository ResourceClientV1 controller.ResourceServiceInstanceRepository ResourceServiceKey controller.ResourceServiceKeyRepository ResCatalogAPI catalog.ResourceCatalogRepository ResGroupAPI management.ResourceGroupRepository }
func (*Client) CreateServiceInstance ¶
func (*Client) DeleteServiceInstance ¶
DeleteSericeInstance deletes service instances on the IBM Cloud, takes instanceID as input
func (*Client) GetResourceKeys ¶
func (c *Client) GetResourceKeys(instanceID string) ([]models.ServiceKey, error)
type CreateResourceKeyOptions ¶
type CreateResourceKeyOptions struct { *rcv2.CreateResourceKeyOptions // Overriding the Parameters to accommodate the HMAC parameter Parameters map[string]interface{} `json:"parameters,omitempty"` }
type PVMClient ¶
type PVMClient struct { InstanceName string InstanceID string Region string Zone string PISession *ibmpisession.IBMPISession InstanceClient *instance.Client ImgClient *image.Client VolumeClient *volume.Client NetworkClient *network.Client EventsClient *events.Client }
func NewPVMClient ¶
type ResourceControllerV2 ¶
type ResourceControllerV2 struct {
ResourceControllerV2 *rcv2.ResourceControllerV2
}
func NewResourceControllerV2 ¶
func NewResourceControllerV2(r *rcv2.ResourceControllerV2Options) (*ResourceControllerV2, error)
func (*ResourceControllerV2) CreateResourceKey ¶
func (resourceController *ResourceControllerV2) CreateResourceKey(createResourceKeyOptions *CreateResourceKeyOptions) (result *rcv2.ResourceKey, response *core.DetailedResponse, err error)
func (*ResourceControllerV2) CreateResourceKeyWithContext ¶
func (resourceController *ResourceControllerV2) CreateResourceKeyWithContext(ctx context.Context, createResourceKeyOptions *CreateResourceKeyOptions) (result *rcv2.ResourceKey, response *core.DetailedResponse, err error)
Overriding the CreateResourceKeyWithContext function from the ResourceControllerV2 code to work with HMAC parameter
func (*ResourceControllerV2) ListResourceKeysBySourceCrn ¶
func (resourceController *ResourceControllerV2) ListResourceKeysBySourceCrn(name, sourceCrn string) (keys []rcv2.ResourceKey, err error)
ListResourceKeysBySourceCrn will return all the resource keys by name belongs to a sourceCrn
type S3Client ¶
type S3Client struct { ApiKey string InstanceName string InstanceID string Region string StorageClass string SvcEndpoint string S3Session *s3.S3 }
func NewS3Client ¶
Func NewS3Client accepts apikey, instanceid of the IBM COS instance and return the s3 client to perform different s3 operations like upload, delete etc.,
func (*S3Client) CheckBucketExists ¶
Func CheckBucketExists will verify for the existence of the bucket in the particular account
func (*S3Client) CheckIfObjectExists ¶
func (*S3Client) CreateBucket ¶
To create a new bucket in the provided instance
func (*S3Client) UploadObject ¶
To upload a object to S3 bucket
Source Files ¶
Click to show internal directories.
Click to hide internal directories.