cfstore

package
v0.143.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultInitTimeout = 5 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CFDataClient

type CFDataClient interface {
	ListServicePlans() ([]cfclient.ServicePlan, error)
	ListServices() ([]cfclient.Service, error)
	ListOrgs() ([]V3Org, error)
	ListSpaces() ([]cfclient.Space, error)
}

type Client

type Client struct {
	Client *cfclient.Client
}

func (*Client) ListOrgs added in v0.38.0

func (c *Client) ListOrgs() ([]V3Org, error)

func (*Client) ListServicePlans

func (c *Client) ListServicePlans() ([]cfclient.ServicePlan, error)

func (*Client) ListServices

func (c *Client) ListServices() ([]cfclient.Service, error)

func (*Client) ListSpaces added in v0.38.0

func (c *Client) ListSpaces() ([]cfclient.Space, error)

type Config

type Config struct {
	// CFClient config
	ClientConfig *cfclient.Config
	// Client for communicating with cf
	Client CFDataClient
	// Database connection
	DB *sql.DB
	// Logger overrides the default logger
	Logger lager.Logger
	// Collection delay
	Schedule time.Duration
}

type Pagination added in v0.100.0

type Pagination struct {
	TotalResults int `json:"total_results"`
	TotalPages   int `json:"total_pages"`
	First        struct {
		Href string `json:"href"`
	} `json:"first"`
	Last struct {
		Href string `json:"href"`
	} `json:"last"`
	Next struct {
		Href string `json:"href"`
	} `json:"next"`
	Previous struct {
		Href string `json:"href"`
	} `json:"previous"`
}

type Store

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

func New

func New(cfg Config) (*Store, error)

func (*Store) CollectOrgs added in v0.38.0

func (s *Store) CollectOrgs() error

func (*Store) CollectServicePlans

func (s *Store) CollectServicePlans() error

func (*Store) CollectServices

func (s *Store) CollectServices() error

func (*Store) CollectSpaces added in v0.38.0

func (s *Store) CollectSpaces() error

func (*Store) Init

func (s *Store) Init() error

func (*Store) Ping added in v0.124.0

func (s *Store) Ping() error

type V3Org added in v0.83.0

type V3Org struct {
	Guid          string             `json:"guid"`
	Name          string             `json:"name"`
	CreatedAt     string             `json:"created_at"`
	UpdatedAt     string             `json:"updated_at"`
	Metadata      V3OrgMetadata      `json:"metadata"`
	Relationships V3OrgRelationships `json:"relationships"`
}

type V3OrgMetadata added in v0.83.0

type V3OrgMetadata struct {
	Annotations V3OrgMetadataAnnotations `json:"annotations"`
}

type V3OrgMetadataAnnotations added in v0.83.0

type V3OrgMetadataAnnotations struct {
	Owner string `json:"owner"`
}

type V3OrgRelationships added in v0.83.0

type V3OrgRelationships struct {
	Quota V3OrgRelationshipsQuota `json:"quota"`
}

type V3OrgRelationshipsQuota added in v0.83.0

type V3OrgRelationshipsQuota struct {
	Data V3OrgRelationshipsQuotaData `json:"data"`
}

type V3OrgRelationshipsQuotaData added in v0.83.0

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

type V3OrgsResponse added in v0.83.0

type V3OrgsResponse struct {
	Pagination Pagination `json:"pagination"`
	Resources  []V3Org    `json:"resources"`
}

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