Documentation ¶
Index ¶
- func API(rootAPI string, serviceBroker domain.ServiceBroker, logger lager.Logger, ...) func(router *mux.Router)
- func IsFailed(status *schema.BundleInstanceAuthStatus) bool
- func IsInProgress(status *schema.BundleInstanceAuthStatus) bool
- func IsNotFoundError(err error) bool
- func IsSucceeded(status *schema.BundleInstanceAuthStatus) bool
- func IsUnused(status *schema.BundleInstanceAuthStatus) bool
- type Auth
- type AuthDetails
- type AuthType
- type BasicAuth
- type BasicAuthConfig
- type BindEndpoint
- type BindLastOperationEndpoint
- type BindingCredentials
- type BrokerOperationType
- type CSRFConfig
- type CatalogConverter
- type CatalogEndpoint
- type CertificateConfig
- type CertificateGen
- type Converter
- type Credentials
- type DeprovisionEndpoint
- type GetBindingEndpoint
- type GetInstanceEndpoint
- type GqlClientForBroker
- type InstanceLastOperationEndpoint
- type NoAuthConfig
- type OAuth
- type OauthConfig
- type ProvisionEndpoint
- type RequestParameters
- type SystemBroker
- type UnbindEndpoint
- type UpdateInstanceEndpoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFailed ¶
func IsFailed(status *schema.BundleInstanceAuthStatus) bool
func IsInProgress ¶
func IsInProgress(status *schema.BundleInstanceAuthStatus) bool
func IsNotFoundError ¶
func IsSucceeded ¶
func IsSucceeded(status *schema.BundleInstanceAuthStatus) bool
func IsUnused ¶
func IsUnused(status *schema.BundleInstanceAuthStatus) bool
Types ¶
type Auth ¶
type Auth interface {
ToCredentials() *Credentials
}
type AuthDetails ¶
type AuthDetails struct { RequestParameters *RequestParameters `json:"request_parameters,omitempty"` CSRFConfig *CSRFConfig `json:"csrf_config,omitempty"` Credentials Auth `json:"auth,omitempty"` }
type BasicAuth ¶
type BasicAuth struct { // Username to use for authentication Username string // Password to use for authentication Password string }
BasicAuth contains details of BasicAuth Auth configuration
type BasicAuthConfig ¶
func (BasicAuthConfig) ToCredentials ¶
func (bc BasicAuthConfig) ToCredentials() *Credentials
type BindEndpoint ¶
type BindEndpoint struct {
// contains filtered or unexported fields
}
func NewBindEndpoint ¶
func NewBindEndpoint(credentialsCreator types.BundleCredentialsCreateRequester, credentialsGetter types.BundleCredentialsFetcher) *BindEndpoint
type BindLastOperationEndpoint ¶
type BindLastOperationEndpoint struct {
// contains filtered or unexported fields
}
func NewBindLastOperationEndpoint ¶
func NewBindLastOperationEndpoint(credentialsGetter types.BundleCredentialsFetcher) *BindLastOperationEndpoint
func (*BindLastOperationEndpoint) LastBindingOperation ¶
func (b *BindLastOperationEndpoint) LastBindingOperation(ctx context.Context, instanceID, bindingID string, details domain.PollDetails) (domain.LastOperation, error)
type BindingCredentials ¶
type BindingCredentials struct { ID string `json:"id"` Type AuthType `json:"credentials_type"` TargetURLs map[string]string `json:"target_urls"` AuthDetails AuthDetails `json:"auth_details"` }
type BrokerOperationType ¶
type BrokerOperationType string
const ( ProvisionOp BrokerOperationType = "provision_operation" BindOp BrokerOperationType = "bind_operation" UnbindOp BrokerOperationType = "unbind_operation" DeprovisionOp BrokerOperationType = "deprovision_operation" )
type CSRFConfig ¶
type CSRFConfig struct {
TokenURL string `json:"token_url"`
}
type CatalogConverter ¶
type CatalogConverter struct {
ORDServiceURL string
}
func (CatalogConverter) Convert ¶
func (c CatalogConverter) Convert(app *schema.ApplicationExt) (*domain.Service, error)
type CatalogEndpoint ¶
type CatalogEndpoint struct {
// contains filtered or unexported fields
}
func NewCatalogEndpoint ¶
func NewCatalogEndpoint(l types.ApplicationsLister, c Converter) *CatalogEndpoint
type CertificateConfig ¶
type CertificateConfig struct { Certificate []byte `json:"certificate"` PrivateKey []byte `json:"privateKey"` }
func (CertificateConfig) ToCredentials ¶
func (cc CertificateConfig) ToCredentials() *Credentials
type CertificateGen ¶
type CertificateGen struct { // CommonName of the certificate // Deprecated: This field is only used for old implementation of fetching credentials from Application and Secrets // It should be removed when it is no longer supported CommonName string // Certificate generated by Application Registry Certificate []byte // PrivateKey generated by Application Registry PrivateKey []byte }
CertificateGen details of CertificateGen configuration
type Converter ¶
type Converter interface {
Convert(app *schema.ApplicationExt) (*domain.Service, error)
}
type Credentials ¶
type Credentials struct { // OAuth is OAuth configuration. OAuth *OAuth // BasicAuth is BasicAuth configuration. BasicAuth *BasicAuth // CertificateGen is CertificateGen configuration. CertificateGen *CertificateGen // CSRFTokenEndpointURL (optional) to fetch CSRF token // Deprecated: This field is only used for old implementation of fetching credentials from Application and Secrets. It is not used by authorization package. // It should be removed when it is no longer supported CSRFTokenEndpointURL string }
Credentials contains OAuth or BasicAuth configuration.
type DeprovisionEndpoint ¶
type DeprovisionEndpoint struct { }
func NewDeprovisionEndpoint ¶
func NewDeprovisionEndpoint() *DeprovisionEndpoint
func (*DeprovisionEndpoint) Deprovision ¶
func (b *DeprovisionEndpoint) Deprovision(ctx context.Context, instanceID string, details domain.DeprovisionDetails, asyncAllowed bool) (domain.DeprovisionServiceSpec, error)
type GetBindingEndpoint ¶
type GetBindingEndpoint struct {
// contains filtered or unexported fields
}
func NewGetBindingEndpoint ¶
func NewGetBindingEndpoint(credentialsGetter types.BundleCredentialsFetcherForInstance) *GetBindingEndpoint
func (*GetBindingEndpoint) GetBinding ¶
func (b *GetBindingEndpoint) GetBinding(ctx context.Context, instanceID, bindingID string) (domain.GetBindingSpec, error)
type GetInstanceEndpoint ¶
type GetInstanceEndpoint struct { }
func NewGetInstanceEndpoint ¶
func NewGetInstanceEndpoint() *GetInstanceEndpoint
func (*GetInstanceEndpoint) GetInstance ¶
func (b *GetInstanceEndpoint) GetInstance(ctx context.Context, instanceID string) (domain.GetInstanceDetailsSpec, error)
type GqlClientForBroker ¶
type GqlClientForBroker interface { types.ApplicationsLister types.BundleCredentialsFetcher types.BundleCredentialsFetcherForInstance types.BundleCredentialsCreateRequester types.BundleCredentialsDeleteRequester }
type InstanceLastOperationEndpoint ¶
type InstanceLastOperationEndpoint struct { }
func NewInstanceLastOperationEndpoint ¶
func NewInstanceLastOperationEndpoint() *InstanceLastOperationEndpoint
func (*InstanceLastOperationEndpoint) LastOperation ¶
func (b *InstanceLastOperationEndpoint) LastOperation(ctx context.Context, instanceID string, details domain.PollDetails) (domain.LastOperation, error)
type NoAuthConfig ¶
type NoAuthConfig struct{}
func (NoAuthConfig) ToCredentials ¶
func (oc NoAuthConfig) ToCredentials() *Credentials
type OAuth ¶
type OAuth struct { // URL to OAuth token provider. URL string // ClientID to use for ClientID string // ClientSecret to use for ClientSecret string // RequestParameters will be used with request send by the Application Gateway. RequestParameters *RequestParameters }
OAuth contains details of OAuth configuration
type OauthConfig ¶
type OauthConfig struct { ClientId string `json:"clientId"` ClientSecret string `json:"clientSecret"` TokenURL string `json:"tokenUrl"` RequestParameters RequestParameters `json:"requestParameters,omitempty"` }
func (OauthConfig) ToCredentials ¶
func (oc OauthConfig) ToCredentials() *Credentials
type ProvisionEndpoint ¶
type ProvisionEndpoint struct { }
func NewProvisionEndpoint ¶
func NewProvisionEndpoint() *ProvisionEndpoint
func (*ProvisionEndpoint) Provision ¶
func (b *ProvisionEndpoint) Provision(ctx context.Context, instanceID string, details domain.ProvisionDetails, asyncAllowed bool) (domain.ProvisionedServiceSpec, error)
type RequestParameters ¶
type RequestParameters struct { Headers *map[string][]string `json:"headers,omitempty"` QueryParameters *map[string][]string `json:"query_parameters,omitempty"` }
RequestParameters contains Headers and QueryParameters
type SystemBroker ¶
type SystemBroker struct { *CatalogEndpoint *ProvisionEndpoint *DeprovisionEndpoint *UpdateInstanceEndpoint *GetInstanceEndpoint *InstanceLastOperationEndpoint *BindEndpoint *UnbindEndpoint *GetBindingEndpoint *BindLastOperationEndpoint }
func NewSystemBroker ¶
func NewSystemBroker(client GqlClientForBroker, ORDServiceURL string) *SystemBroker
type UnbindEndpoint ¶
type UnbindEndpoint struct {
// contains filtered or unexported fields
}
func NewUnbindEndpoint ¶
func NewUnbindEndpoint(credentialsGetter types.BundleCredentialsFetcher, credentialsDeleter types.BundleCredentialsDeleteRequester) *UnbindEndpoint
func (*UnbindEndpoint) Unbind ¶
func (b *UnbindEndpoint) Unbind(ctx context.Context, instanceID, bindingID string, details domain.UnbindDetails, asyncAllowed bool) (domain.UnbindSpec, error)
type UpdateInstanceEndpoint ¶
type UpdateInstanceEndpoint struct { }
func NewUpdateInstanceEndpoint ¶
func NewUpdateInstanceEndpoint() *UpdateInstanceEndpoint
func (*UpdateInstanceEndpoint) Update ¶
func (b *UpdateInstanceEndpoint) Update(ctx context.Context, instanceID string, details domain.UpdateDetails, asyncAllowed bool) (domain.UpdateServiceSpec, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.