services

package
v2.16.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: Apache-2.0 Imports: 18 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 cats_config.CatsConfig)

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
	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 string, 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) GetSpaceGuid

func (b ServiceBroker) GetSpaceGuid() string

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(url string)

func (ServiceBroker) PublicizePlans

func (b ServiceBroker) PublicizePlans()

func (ServiceBroker) Push

func (b ServiceBroker) Push(config cats_config.CatsConfig)

func (ServiceBroker) PushWithBuildpackAndManifest

func (b ServiceBroker) PushWithBuildpackAndManifest(config cats_config.CatsConfig, buildpackName string)

func (ServiceBroker) Restart

func (b ServiceBroker) Restart()

func (ServiceBroker) ToJSON

func (b ServiceBroker) ToJSON() string

func (ServiceBroker) Update

func (b ServiceBroker) Update()

type ServiceInstance

type ServiceInstance struct {
	Metadata struct {
		Guid string `json:"guid"`
	}
}

type ServiceInstanceResponse

type ServiceInstanceResponse struct {
	Resources []ServiceInstance
}

type ServicePlanResponse

type ServicePlanResponse struct {
	Entity struct {
		Name    string
		Public  bool
		Schemas PlanSchemas
	}
	Metadata struct {
		Url  string
		Guid string
	}
}

type ServicePlansResponse

type ServicePlansResponse struct {
	Resources []ServicePlanResponse
}

type ServiceResponse

type ServiceResponse struct {
	Entity struct {
		Label        string
		ServicePlans []ServicePlanResponse `json:"service_plans"`
	}
}

type ServicesResponse

type ServicesResponse struct {
	Resources []ServiceResponse
}

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