Documentation ¶
Index ¶
- Constants
- func GiveBrowserTimeToOpen()
- func NewV2Client(serverURL *url.URL) *v2Client
- func NewV2ClientWithHttpClient(client *http.Client, serverURL *url.URL) *v2Client
- func OptionalCustomIdpPath(loginReq *BrowserLoginRequest) string
- type Action
- type ApiCredentialInput
- type BrowserLoginPostResponse
- type BrowserLoginRequest
- type BrowserResponse
- type BtpClientError
- type ClientFacade
- func (v2 ClientFacade) BrowserLogin(ctx context.Context, loginReq *BrowserLoginRequest) (*BrowserLoginPostResponse, error)
- func (v2 ClientFacade) Execute(ctx context.Context, cmdReq *CommandRequest, options ...CommandOptions) (cmdRes CommandResponse, err error)
- func (v2 ClientFacade) GetGlobalAccountSubdomain() string
- func (v2 ClientFacade) GetLoggedInUser() *v2LoggedInUser
- func (v2 ClientFacade) IdTokenLogin(ctx context.Context, loginReq *IdTokenLoginRequest) (*LoginResponse, error)
- func (v2 ClientFacade) Login(ctx context.Context, loginReq *LoginRequest) (*LoginResponse, error)
- func (v2 ClientFacade) PasscodeLogin(ctx context.Context, loginReq *PasscodeLoginRequest) (*LoginResponse, error)
- type CommandOptions
- type CommandRequest
- func NewAddRequest(command string, args any) *CommandRequest
- func NewAssignRequest(command string, args any) *CommandRequest
- func NewCommandRequest(action Action, command string, args any) *CommandRequest
- func NewCreateRequest(command string, args any) *CommandRequest
- func NewDeleteRequest(command string, args any) *CommandRequest
- func NewDisableRequest(command string, args any) *CommandRequest
- func NewEnableRequest(command string, args any) *CommandRequest
- func NewGetRequest(command string, args any) *CommandRequest
- func NewListRequest(command string, args any) *CommandRequest
- func NewRegisterRequest(command string, args any) *CommandRequest
- func NewRemoveRequest(command string, args any) *CommandRequest
- func NewShareRequest(command string, args any) *CommandRequest
- func NewSubscribeRequest(command string, args any) *CommandRequest
- func NewUnassignRequest(command string, args any) *CommandRequest
- func NewUnregisterRequest(command string, args any) *CommandRequest
- func NewUnshareRequest(command string, args any) *CommandRequest
- func NewUnsubscribeRequest(command string, args any) *CommandRequest
- func NewUpdateRequest(command string, args any) *CommandRequest
- type CommandResponse
- type DirectoryAssignmentInput
- type DirectoryCreateInput
- type DirectoryEnableInput
- type DirectoryRoleCreateInput
- type DirectoryUpdateInput
- type GlobalAccountRoleCreateInput
- type GlobalaccountResourceProviderCreateUpdateInput
- type IdTokenLoginRequest
- type LoginRequest
- type LoginResponse
- type PasscodeLoginRequest
- type SecuritySettingsUpdateInput
- type ServiceInstanceCreateInput
- type ServiceInstanceShareInput
- type ServiceInstanceUpdateInput
- type Session
- type SmBrokerError
- type SubaccountCreateInput
- type SubaccountEnvironmentInstanceCreateInput
- type SubaccountEnvironmentInstanceUpdateInput
- type SubaccountRoleCreateInput
- type SubaccountServiceBindingCreateInput
- type SubaccountServiceBrokerRegisterInput
- type SubaccountServiceBrokerUpdateInput
- type SubaccountUpdateInput
- type TrustConfigurationCreateInput
- type TrustConfigurationUpdateInput
- type UnfoldedAssignment
- type UnfoldedEntitlement
Constants ¶
const ( HeaderCorrelationID string = "X-Correlationid" HeaderIDToken string = "X-Id-Token" HeaderCLIFormat string = "X-Cpcli-Format" HeaderCLISessionId string = "X-Cpcli-Sessionid" HeaderCLISubdomain string = "X-Cpcli-Subdomain" HeaderCLICustomIDP string = "X-Cpcli-Customidp" HeaderCLIBackendStatus string = "X-Cpcli-Backend-Status" HeaderCLIBackendMessage string = "X-Cpcli-Backend-Message" HeaderCLIBackendMediaType string = "X-Cpcli-Backend-Mediatype" HeaderCLIClientUpdate string = "X-Cpcli-Client-Update" HeaderCLIServerMessage string = "X-Cpcli-Server-Message" )
const DefaultServerURL string = "https://cli.btp.cloud.sap"
Variables ¶
This section is empty.
Functions ¶
func GiveBrowserTimeToOpen ¶ added in v1.3.0
func GiveBrowserTimeToOpen()
func NewV2Client ¶
func OptionalCustomIdpPath ¶ added in v1.3.0
func OptionalCustomIdpPath(loginReq *BrowserLoginRequest) string
Types ¶
type Action ¶
type Action string
const ( ActionAdd Action = "add" ActionAssign Action = "assign" ActionCreate Action = "create" ActionDelete Action = "delete" ActionDisable Action = "disable" ActionEnable Action = "enable" ActionGet Action = "get" ActionList Action = "list" ActionRegister Action = "register" ActionRemove Action = "remove" ActionSubscribe Action = "subscribe" ActionUnassign Action = "unassign" ActionUnregister Action = "unregister" ActionUnsubscribe Action = "unsubscribe" ActionUpdate Action = "update" )
type ApiCredentialInput ¶ added in v1.6.0
type BrowserLoginPostResponse ¶ added in v1.3.0
type BrowserLoginRequest ¶ added in v1.3.0
type BrowserLoginRequest struct { CustomIdp string `json:"customIdp"` GlobalAccountSubdomain string `json:"subdomain"` }
func NewBrowserLoginRequest ¶ added in v1.3.0
func NewBrowserLoginRequest(idp string, globalaccountSubdomain string) *BrowserLoginRequest
type BrowserResponse ¶ added in v1.3.0
type BtpClientError ¶ added in v1.4.0
type BtpClientError struct { Message string `json:"error"` // This should always be available Description string `json:"description"` BrokerError *SmBrokerError `json:"broker_error"` // Service Broker/Service Manager specific }
We define an Uber Error type that is used to handle errors from the BTP CLI client. The error structure comprises the possible JSON structure of the error responses
type ClientFacade ¶
type ClientFacade struct { Accounts accountsFacade Services servicesFacade Security securityFacade // contains filtered or unexported fields }
func NewClientFacade ¶
func NewClientFacade(cliClient *v2Client) *ClientFacade
func (ClientFacade) BrowserLogin ¶ added in v1.3.0
func (v2 ClientFacade) BrowserLogin(ctx context.Context, loginReq *BrowserLoginRequest) (*BrowserLoginPostResponse, error)
BrowserLogin authenticates user using SSO
func (ClientFacade) Execute ¶
func (v2 ClientFacade) Execute(ctx context.Context, cmdReq *CommandRequest, options ...CommandOptions) (cmdRes CommandResponse, err error)
Execute executes a command
func (ClientFacade) GetGlobalAccountSubdomain ¶
func (v2 ClientFacade) GetGlobalAccountSubdomain() string
func (ClientFacade) GetLoggedInUser ¶
func (v2 ClientFacade) GetLoggedInUser() *v2LoggedInUser
func (ClientFacade) IdTokenLogin ¶
func (v2 ClientFacade) IdTokenLogin(ctx context.Context, loginReq *IdTokenLoginRequest) (*LoginResponse, error)
IdTokenLogin authenticates a user by providing an id token
func (ClientFacade) Login ¶
func (v2 ClientFacade) Login(ctx context.Context, loginReq *LoginRequest) (*LoginResponse, error)
Login authenticates a user using username + password
func (ClientFacade) PasscodeLogin ¶
func (v2 ClientFacade) PasscodeLogin(ctx context.Context, loginReq *PasscodeLoginRequest) (*LoginResponse, error)
PasscodeLogin authenticates with a pem encoded x509 key-pair
type CommandOptions ¶
type CommandRequest ¶
func NewAddRequest ¶
func NewAddRequest(command string, args any) *CommandRequest
NewAddRequest creates a new add request
func NewAssignRequest ¶
func NewAssignRequest(command string, args any) *CommandRequest
NewAssignRequest creates a new assign request
func NewCommandRequest ¶
func NewCommandRequest(action Action, command string, args any) *CommandRequest
Command
func NewCreateRequest ¶
func NewCreateRequest(command string, args any) *CommandRequest
NewCreateRequest creates a new create request
func NewDeleteRequest ¶
func NewDeleteRequest(command string, args any) *CommandRequest
NewDeleteRequest creates a new delete request
func NewDisableRequest ¶
func NewDisableRequest(command string, args any) *CommandRequest
NewDisableRequest creates a new disable request
func NewEnableRequest ¶
func NewEnableRequest(command string, args any) *CommandRequest
NewEnableRequest creates a new enable request
func NewGetRequest ¶
func NewGetRequest(command string, args any) *CommandRequest
NewGetRequest creates a new get request
func NewListRequest ¶
func NewListRequest(command string, args any) *CommandRequest
NewListRequest creates a new list request
func NewRegisterRequest ¶
func NewRegisterRequest(command string, args any) *CommandRequest
NewRegisterRequest creates a new register request
func NewRemoveRequest ¶
func NewRemoveRequest(command string, args any) *CommandRequest
NewRemoveRequest creates a new remove request
func NewShareRequest ¶
func NewShareRequest(command string, args any) *CommandRequest
NewShareRequest creates a new share request
func NewSubscribeRequest ¶
func NewSubscribeRequest(command string, args any) *CommandRequest
NewSubscribeRequest creates a new subscribe request
func NewUnassignRequest ¶
func NewUnassignRequest(command string, args any) *CommandRequest
NewUnassignRequest creates a new unassign request
func NewUnregisterRequest ¶
func NewUnregisterRequest(command string, args any) *CommandRequest
NewUnregisterRequest creates a new unregister request
func NewUnshareRequest ¶
func NewUnshareRequest(command string, args any) *CommandRequest
NewUnshareRequest creates a new unshare request
func NewUnsubscribeRequest ¶
func NewUnsubscribeRequest(command string, args any) *CommandRequest
NewUnsubscribeRequest creates a new unsubscribe request
func NewUpdateRequest ¶
func NewUpdateRequest(command string, args any) *CommandRequest
NewUpdateRequest creates a new update request
type CommandResponse ¶
type CommandResponse struct { StatusCode int ContentType string Body io.ReadCloser }
type DirectoryCreateInput ¶
type DirectoryCreateInput struct { DisplayName string `btpcli:"displayName"` Description *string `btpcli:"description"` ParentID *string `btpcli:"parentID"` Subdomain *string `btpcli:"subdomain"` Labels map[string][]string `btpcli:"labels"` Globalaccount string `btpcli:"globalAccount"` Features []string `btpcli:"directoryFeatures"` }
type DirectoryEnableInput ¶ added in v1.1.0
type DirectoryUpdateInput ¶
type GlobalaccountResourceProviderCreateUpdateInput ¶
type GlobalaccountResourceProviderCreateUpdateInput struct { Provider string `btpcli:"provider"` TechnicalName string `btpcli:"technicalName"` DisplayName string `btpcli:"displayName"` Description string `btpcli:"description"` Configuration string `btpcli:"configurationInfo"` Globalaccount string `btpcli:"globalAccount"` }
type IdTokenLoginRequest ¶
type IdTokenLoginRequest struct { GlobalAccountSubdomain string `json:"subdomain"` IdToken string `json:"idToken"` }
func NewIdTokenLoginRequest ¶
func NewIdTokenLoginRequest(globalaccountSubdomain string, idToken string) *IdTokenLoginRequest
type LoginRequest ¶
type LoginRequest struct { IdentityProvider string `json:"customIdp"` GlobalAccountSubdomain string `json:"subdomain"` Username string `json:"userName"` Password string `json:"password"` }
func NewLoginRequest ¶
func NewLoginRequest(globalaccountSubdomain string, username string, password string) *LoginRequest
NewLoginRequest returns a new LoginRequest with `ldap` as default IdentityProvider set.
func NewLoginRequestWithCustomIDP ¶
func NewLoginRequestWithCustomIDP(idp string, globalaccountSubdomain string, username string, password string) *LoginRequest
type LoginResponse ¶
type PasscodeLoginRequest ¶
type SecuritySettingsUpdateInput ¶
type SecuritySettingsUpdateInput struct { IFrame string `btpcli:"iFrameDomain"` CustomEmail []string `btpcli:"customEmailDomains,json"` DefaultIDPForNonInteractiveLogon string `btpcli:"defaultIdp"` TreatUsersWithSameEmailAsSameUser bool `btpcli:"treatUsersWithSameEmailAsSameUser"` HomeRedirect string `btpcli:"homeRedirect"` AccessTokenValidity int `btpcli:"accessTokenValidity"` RefreshTokenValidity int `btpcli:"refreshTokenValidity"` }
type ServiceInstanceShareInput ¶ added in v1.2.0
type ServiceInstanceShareInput struct {}
type SmBrokerError ¶ added in v1.4.0
type SmBrokerError struct { // The broker status code. StatusCode int32 `json:"StatusCode"` // A machine-readable error string that may be returned by the broker. ErrorMessage string `json:"ErrorMessage"` // A human-readable description of the error that may be returned by the broker. Description string `json:"Description"` // ResponseError is set to the error that occurred when unmarshalling a response body from the broker. ResponseError string `json:"ResponseError"` }
The service broker error
type SubaccountCreateInput ¶
type SubaccountCreateInput struct { BetaEnabled bool `btpcli:"betaEnabled"` Description string `btpcli:"description"` Directory string `btpcli:"directoryID"` DisplayName string `btpcli:"displayName"` Labels map[string][]string `btpcli:"labels"` Region string `btpcli:"region"` Subdomain string `btpcli:"subdomain"` UsedForProduction string `btpcli:"usedForProduction"` Globalaccount string `btpcli:"globalAccount"` }
type SubaccountEnvironmentInstanceCreateInput ¶
type SubaccountEnvironmentInstanceCreateInput struct { DisplayName string `btpcli:"displayName"` EnvironmentType string `btpcli:"environmentType"` Landscape string `btpcli:"landscapeLabel"` Parameters string `btpcli:"parameters"` Plan string `btpcli:"plan"` Service string `btpcli:"service"` SubaccountID string `btpcli:"subaccount"` }
type SubaccountServiceBrokerRegisterInput ¶ added in v1.5.0
type SubaccountServiceBrokerUpdateInput ¶ added in v1.5.0
type SubaccountServiceBrokerUpdateInput struct { Id string `btpcli:"id"` Subaccount string `btpcli:"subaccount"` NewName string `btpcli:"newName"` Description string `btpcli:"description"` User string `btpcli:"user"` Password string `btpcli:"password"` URL string `btpcli:"url"` Labels map[string][]string `btpcli:"labels"` }
type SubaccountUpdateInput ¶
type SubaccountUpdateInput struct { BetaEnabled bool `btpcli:"betaEnabled"` Description string `btpcli:"description"` Directory string `btpcli:"directoryID"` DisplayName string `btpcli:"displayName"` Labels map[string][]string `btpcli:"labels"` SubaccountId string `btpcli:"subaccount"` UsedForProduction string `btpcli:"usedForProduction"` Globalaccount string `btpcli:"globalAccount"` }
type TrustConfigurationUpdateInput ¶
type TrustConfigurationUpdateInput struct { OriginKey string `btpcli:"originKey"` IdentityProvider *string `btpcli:"iasTenantUrl"` Name *string `btpcli:"name"` Description *string `btpcli:"description"` Domain *string `btpcli:"domain"` LinkText *string `btpcli:"linkText"` // subaccount only AvailableForUserLogon *bool `btpcli:"userLogon"` // subaccount only AutoCreateShadowUsers *bool `btpcli:"shadowUsers"` // subaccount only Status *string `btpcli:"status"` }
type UnfoldedAssignment ¶
type UnfoldedAssignment struct { Service cis_entitlements.AssignedServiceResponseObject Plan cis_entitlements.AssignedServicePlanResponseObject Assignment cis_entitlements.AssignedServicePlanSubaccountDto }
type UnfoldedEntitlement ¶
type UnfoldedEntitlement struct { Service cis_entitlements.EntitledServicesResponseObject Plan cis_entitlements.ServicePlanResponseObject }
Source Files ¶
- actions.go
- client.go
- clienttypes.go
- facade.go
- facade_accounts.go
- facade_accounts_available_environment.go
- facade_accounts_available_region.go
- facade_accounts_directory.go
- facade_accounts_entitlement.go
- facade_accounts_environment_instance.go
- facade_accounts_global_account.go
- facade_accounts_label.go
- facade_accounts_resource_provider.go
- facade_accounts_subaccount.go
- facade_accounts_subscription.go
- facade_security.go
- facade_security_api_credential.go
- facade_security_app.go
- facade_security_role.go
- facade_security_role_collection.go
- facade_security_settings.go
- facade_security_trust.go
- facade_security_user.go
- facade_services.go
- facade_services_binding.go
- facade_services_broker.go
- facade_services_instance.go
- facade_services_offering.go
- facade_services_plan.go
- facade_services_platform.go
- helper.go
- session.go
- transport.go
Directories ¶
Path | Synopsis |
---|---|
types
|
|
cis
* Entitlements Service * * The Entitlements service provides REST APIs that manage the assignments of entitlements and quotas to subaccounts and directories.
|
* Entitlements Service * * The Entitlements service provides REST APIs that manage the assignments of entitlements and quotas to subaccounts and directories. |
cis_entitlements
* Entitlements Service * * The Entitlements service provides REST APIs that manage the assignments of entitlements and quotas to subaccounts and directories.
|
* Entitlements Service * * The Entitlements service provides REST APIs that manage the assignments of entitlements and quotas to subaccounts and directories. |
provisioning
* Provisioning Service * * The Provisioning service provides REST APIs that are responsible for the provisioning and deprovisioning of environment instances and tenants in the corresponding region.
|
* Provisioning Service * * The Provisioning service provides REST APIs that are responsible for the provisioning and deprovisioning of environment instances and tenants in the corresponding region. |
saas_manager_service
* SaaS Provisioning Service * * The SAP SaaS Provisioning service provides REST APIs that are responsible for the registration and provisioning of multitenant applications and services.
|
* SaaS Provisioning Service * * The SAP SaaS Provisioning service provides REST APIs that are responsible for the registration and provisioning of multitenant applications and services. |
servicemanager
* Service Manager * * Service Manager provides REST APIs that are responsible for the creation and consumption of service instances in any connected runtime environment.
|
* Service Manager * * Service Manager provides REST APIs that are responsible for the creation and consumption of service instances in any connected runtime environment. |
xsuaa_authz
* Authorization * * Provides functions to administrate the Authorization and Trust Management service (XSUAA) of SAP BTP, Cloud Foundry environment.
|
* Authorization * * Provides functions to administrate the Authorization and Trust Management service (XSUAA) of SAP BTP, Cloud Foundry environment. |
xsuaa_plattform
* User Management (System for Cross-domain Identity Management (SCIM)) * * Provides functions to administrate the Authorization and Trust Management service (XSUAA) of SAP BTP, Cloud Foundry environment.
|
* User Management (System for Cross-domain Identity Management (SCIM)) * * Provides functions to administrate the Authorization and Trust Management service (XSUAA) of SAP BTP, Cloud Foundry environment. |