cfmetadata

package
v0.0.0-...-85617d8 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AppsResponse = `{
	"resources": [{
			"entity": {
				"name": "test-app-1",
				"space_guid": "space-x-id"
			}
		}
	]}
`
View Source
const OrgsResponse = `` /* 303-byte string literal not displayed */
View Source
const SpacesResponse = `` /* 290-byte string literal not displayed */
View Source
const UsersResponse = `` /* 135-byte string literal not displayed */

Variables

This section is empty.

Functions

func Compare

func Compare(leftMetadataStr []byte, rightMetadata Metadata) (string, error)

Types

type App

type App struct {
	Name      string `json:"name"`
	SpaceGUID string `json:"space_guid"`
}

type AppSummary

type AppSummary struct {
	Name string `json:"name"`
}

type CfClient

type CfClient interface {
	Orgs() ([]Org, error)
	Spaces() ([]Space, error)
	Apps() ([]App, error)
	Users() ([]User, error)
}

type Client

type Client struct {
	CfClient cfclient.CloudFoundryClient
}

func NewClient

func NewClient(apiAddress string, clientID string, clientSecret string) (*Client, error)

func (*Client) Apps

func (c *Client) Apps() ([]App, error)

func (*Client) Orgs

func (c *Client) Orgs() ([]Org, error)

func (*Client) Spaces

func (c *Client) Spaces() ([]Space, error)

func (*Client) Users

func (c *Client) Users() ([]User, error)

type Metadata

type Metadata struct {
	Totals Totals       `json:"totals"`
	Orgs   []OrgSummary `json:"orgs"`
}

type MetadataGetter

type MetadataGetter struct {
	CfClient CfClient
}

func NewMetadataGetter

func NewMetadataGetter(cfClient CfClient) (*MetadataGetter, error)

func (*MetadataGetter) Execute

func (mg *MetadataGetter) Execute() (*Metadata, error)

type Org

type Org struct {
	Name   string  `json:"name"`
	Spaces []Space `json:"spaces"`
	GUID   string  `json:"guid"`
}

type OrgSummary

type OrgSummary struct {
	Name   string         `json:"name"`
	Spaces []SpaceSummary `json:"spaces"`
}

type Space

type Space struct {
	Name    string `json:"name"`
	Apps    []App  `json:"apps"`
	GUID    string `json:"guid"`
	OrgGUID string `json:"org_guid"`
}

type SpaceSummary

type SpaceSummary struct {
	Name string       `json:"name"`
	Apps []AppSummary `json:"apps"`
}

type Totals

type Totals struct {
	Orgs   int `json:"orgs"`
	Spaces int `json:"spaces"`
	Users  int `json:"users"`
	Apps   int `json:"apps"`
}

type User

type User struct {
	Name string `json:"name"`
}

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