service

package
v0.0.0-...-fb356ce Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InstanceNotFound = errors.New("Service instance not found")
)

Functions

This section is empty.

Types

type CFListerClient

type CFListerClient interface {
	GetServiceInstances(cf.GetInstancesFilter, *log.Logger) ([]cf.Instance, error)
}

type CFServiceInstanceLister

type CFServiceInstanceLister struct {
	// contains filtered or unexported fields
}

func NewCFServiceInstanceLister

func NewCFServiceInstanceLister(cfClient CFListerClient, serviceOfferingID string, logger *log.Logger) *CFServiceInstanceLister

func (*CFServiceInstanceLister) Instances

func (l *CFServiceInstanceLister) Instances(filter map[string]string) ([]Instance, error)

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

type Instance

type Instance struct {
	GUID         string `json:"service_instance_id"`
	PlanUniqueID string `json:"plan_id"`
	SpaceGUID    string `json:"space_guid,omitempty"`
}

type InstanceLister

type InstanceLister interface {
	Instances(map[string]string) ([]Instance, error)
}

InstanceLister provides a interface to query service instances present in the platform

func BuildInstanceLister

func BuildInstanceLister(
	client CFListerClient, serviceOfferingID string, siapiConfig config.ServiceInstancesAPI, logger *log.Logger,
) (InstanceLister, error)

type ServiceInstanceLister

type ServiceInstanceLister struct {
	// contains filtered or unexported fields
}

func NewInstanceLister

func NewInstanceLister(
	client Doer,
	authHeaderBuilder authorizationheader.AuthHeaderBuilder,
	baseURL string,
	configured bool,
	logger *log.Logger) *ServiceInstanceLister

func (*ServiceInstanceLister) Instances

func (s *ServiceInstanceLister) Instances(params map[string]string) ([]Instance, error)

func (*ServiceInstanceLister) LatestInstanceInfo

func (s *ServiceInstanceLister) LatestInstanceInfo(instance Instance) (Instance, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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