services

package
v0.0.0-...-fff7cf1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateUser

func AuthenticateUser(authorizationEndpoint string, username string, password string) (cookie string)

func AuthorizeScopes

func AuthorizeScopes(cookie string, config OAuthConfig) (authCode string)

func GetAccessToken

func GetAccessToken(authCode string, config OAuthConfig) (accessToken string)

func ParseJsonResponse

func ParseJsonResponse(response []byte) (resultMap map[string]interface{})

func QueryServiceInstancePermissionEndpoint

func QueryServiceInstancePermissionEndpoint(apiEndpoint string, accessToken string, serviceInstanceGuid string) (canManage string, httpCode string)

func RequestScopes

func RequestScopes(cookie string, config OAuthConfig) (authCode string, httpCode string)

func SetOauthEndpoints

func SetOauthEndpoints(apiEndpoint string, oAuthConfig *OAuthConfig, config bara_config.BaraConfig)

Types

type OAuthConfig

type OAuthConfig struct {
	ClientId              string
	ClientSecret          string
	RedirectUri           string
	RequestedScopes       string
	AuthorizationEndpoint string
	TokenEndpoint         string
}

type Plan

type Plan struct {
	Name    string      `json:"name"`
	ID      string      `json:"id"`
	Schemas PlanSchemas `json:"schemas"`
}

type PlanSchemas

type PlanSchemas struct {
	ServiceInstance struct {
		Create struct {
			Parameters map[string]interface{} `json:"parameters"`
		} `json:"create"`
		Update struct {
			Parameters map[string]interface{} `json:"parameters"`
		} `json:"update"`
	} `json:"service_instance"`
	ServiceBinding struct {
		Create struct {
			Parameters map[string]interface{} `json:"parameters"`
		} `json:"create"`
	} `json:"service_binding"`
}

type ServiceBroker

type ServiceBroker struct {
	Name       string
	SpaceGUID  string
	DomainGUID string
	Path       string
	TestSetup  *workflowhelpers.ReproducibleTestSuiteSetup
	Service    struct {
		Name            string `json:"name"`
		ID              string `json:"id"`
		DashboardClient struct {
			ID          string `json:"id"`
			Secret      string `json:"secret"`
			RedirectUri string `json:"redirect_uri"`
		}
	}
	SyncPlans  []Plan
	AsyncPlans []Plan
}

func NewServiceBroker

func NewServiceBroker(name, spaceGUID, domainGUID, path string, TestSetup *workflowhelpers.ReproducibleTestSuiteSetup) ServiceBroker

func (ServiceBroker) Configure

func (b ServiceBroker) Configure()

func (ServiceBroker) Create

func (b ServiceBroker) Create()

func (ServiceBroker) CreateServiceInstance

func (b ServiceBroker) CreateServiceInstance(instanceName string) string

func (ServiceBroker) CreateSpaceScoped

func (b ServiceBroker) CreateSpaceScoped()

func (ServiceBroker) Delete

func (b ServiceBroker) Delete()

func (ServiceBroker) Destroy

func (b ServiceBroker) Destroy()

func (ServiceBroker) HasPlan

func (b ServiceBroker) HasPlan(planName string) bool

func (ServiceBroker) Plans

func (b ServiceBroker) Plans() []Plan

func (ServiceBroker) PublicizePlan

func (b ServiceBroker) PublicizePlan(guid string)

func (ServiceBroker) PublicizePlans

func (b ServiceBroker) PublicizePlans()

func (ServiceBroker) Push

func (b ServiceBroker) Push(config bara_config.BaraConfig)

func (ServiceBroker) Restart

func (b ServiceBroker) Restart()

func (ServiceBroker) ToJSON

func (b ServiceBroker) ToJSON() string

func (ServiceBroker) Update

func (b ServiceBroker) Update()

type ServiceInstancesResource

type ServiceInstancesResource struct {
	Guid string `json:"guid"`
}

type ServiceInstancesResponse

type ServiceInstancesResponse struct {
	Resources []ServiceInstancesResource `json:"resources"`
}

type ServiceOfferingsResource

type ServiceOfferingsResource struct {
	Guid string `json:"guid"`
	Name string `json:"name"`
}

type ServiceOfferingsResponse

type ServiceOfferingsResponse struct {
	Resources []ServiceOfferingsResource `json:"resources"`
}

type ServicePlansResource

type ServicePlansResource struct {
	Guid string `json:"guid"`
	Name string `json:"name"`
}

type ServicePlansResponse

type ServicePlansResponse struct {
	Resources []ServicePlansResource `json:"resources"`
}

type SpaceJson

type SpaceJson struct {
	Resources []struct {
		Metadata struct {
			Guid string
		}
	}
}

Jump to

Keyboard shortcuts

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