resources

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Org   string `json:"org"`
	Space string `json:"space"`
	Name  string `json:"name"`
	Stack string `json:"stack"`
	State string `json:"state"`
}

func (App) String added in v0.0.5

func (a App) String() string

type Apps added in v0.0.5

type Apps []App

func (Apps) CSV added in v0.0.5

func (a Apps) CSV() (string, error)

func (Apps) Len added in v0.0.5

func (a Apps) Len() int

func (Apps) Less added in v0.0.5

func (a Apps) Less(i, j int) bool

func (Apps) String added in v0.0.5

func (a Apps) String() string

func (Apps) Swap added in v0.0.5

func (a Apps) Swap(i, j int)

type BuildPack added in v0.0.2

type BuildPack struct {
	Metadata struct {
		GUID string `json:"guid"`
		URL  string `json:"url"`
	} `json:"metadata"`
	Entity struct {
		Name     string `json:"name"`
		Stack    string `json:"stack"`
		Position int    `json:"position"`
		Enabled  bool   `json:"enabled"`
		Locked   bool   `json:"locked"`
		Filename string `json:"filename"`
	} `json:"entity"`
}

type BuildpacksJSON added in v0.0.2

type BuildpacksJSON struct {
	TotalResults int         `json:"total_results"`
	TotalPages   int         `json:"total_pages"`
	PrevURL      string      `json:"prev_url"`
	NextURL      string      `json:"next_url"`
	BuildPacks   []BuildPack `json:"resources"`
}

type DropletJSON added in v0.0.4

type DropletJSON struct {
	GUID      string    `json:"guid"`
	State     string    `json:"state"`
	Stack     string    `json:"stack"`
	CreatedAt time.Time `json:"created_at"`
}

type DropletListJSON added in v0.0.4

type DropletListJSON struct {
	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     interface{} `json:"next"`
		Previous interface{} `json:"previous"`
	} `json:"pagination"`
	Resources []DropletJSON `json:"resources"`
}

type Orgs

type Orgs []plugin_models.GetOrgs_Model

func (Orgs) Map

func (o Orgs) Map() map[string]string

type Package added in v0.0.4

type Package struct {
	GUID string `json:"guid"`
	Type string `json:"type"`
	Data struct {
		Error    interface{} `json:"error"`
		Checksum struct {
			Type  string `json:"type"`
			Value string `json:"value"`
		} `json:"checksum"`
	} `json:"data"`
	State string `json:"state"`
}

type PackagerJSON added in v0.0.4

type PackagerJSON struct {
	// TOOD: do we really need paginated results?
	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     interface{} `json:"next"`
		Previous interface{} `json:"previous"`
	} `json:"pagination"`
	Resources []Package `json:"resources"`
}

type Spaces

type Spaces []SpacesJSON

func (Spaces) MakeSpaceOrgAndNameMap

func (s Spaces) MakeSpaceOrgAndNameMap() (map[string]string, map[string]string)

type SpacesJSON

type SpacesJSON struct {
	TotalResults int    `json:"total_results"`
	TotalPages   int    `json:"total_pages"`
	PrevURL      string `json:"prev_url"`
	NextURL      string `json:"next_url"`
	Resources    []struct {
		Metadata struct {
			GUID string `json:"guid"`
			URL  string `json:"url"`
		} `json:"metadata"`
		Entity struct {
			Name             string `json:"name"`
			OrganizationGUID string `json:"organization_guid"`
		} `json:"entity"`
	} `json:"resources"`
}

type Stacks

type Stacks []StacksJSON

func (Stacks) MakeStackMap

func (s Stacks) MakeStackMap() map[string]string

type StacksJSON

type StacksJSON struct {
	TotalResults int    `json:"total_results"`
	TotalPages   int    `json:"total_pages"`
	PrevURL      string `json:"prev_url"`
	NextURL      string `json:"next_url"`
	Resources    []struct {
		Metadata struct {
			GUID string `json:"guid"`
			URL  string `json:"url"`
		} `json:"metadata"`
		Entity struct {
			Name string `json:"name"`
		} `json:"entity"`
	} `json:"resources"`
}

type V2App added in v0.0.2

type V2App struct {
	Metadata struct {
		GUID string `json:"guid"`
	} `json:"metadata"`
	Entity struct {
		Name      string `json:"name"`
		SpaceGUID string `json:"space_guid"`
		StackGUID string `json:"stack_guid"`
		State     string `json:"state"`
	} `json:"entity"`
}

type V2AppsJSON added in v0.0.2

type V2AppsJSON struct {
	NextURL string  `json:"next_url"`
	Apps    []V2App `json:"resources"`
}

Partial structure of JSON when hitting the /v2/apps endpoint

type V2ErrorJSON added in v0.0.3

type V2ErrorJSON struct {
	Description string `json:"description"`
	ErrorCode   string `json:"error_code"`
	Code        int    `json:"code"`
}

type V3App added in v0.0.2

type V3App struct {
	GUID      string `json:"guid"`
	Name      string `json:"name"`
	State     string `json:"state"`
	Lifecycle struct {
		Data struct {
			Stack string `json:"stack"`
		} `json:"data"`
	} `json:"lifecycle"`
	Relationships struct {
		Space struct {
			Data struct {
				GUID string `json:"guid"`
			} `json:"data"`
		} `json:"space"`
	} `json:"relationships"`
	Links struct {
		Self struct {
			Href string `json:"href"`
		} `json:"self"`
		Packages struct {
			Href string `json:"href"`
		} `json:"packages"`
		CurrentDroplet struct {
			Href string `json:"href"`
		} `json:"current_droplet"`
		Droplets struct {
			Href string `json:"href"`
		} `json:"droplets"`
		Tasks struct {
			Href string `json:"href"`
		} `json:"tasks"`
		Start struct {
			Href   string `json:"href"`
			Method string `json:"method"`
		} `json:"start"`
		Stop struct {
			Href   string `json:"href"`
			Method string `json:"method"`
		} `json:"stop"`
		Revisions struct {
			Href string `json:"href"`
		} `json:"revisions"`
		DeployedRevisions struct {
			Href string `json:"href"`
		} `json:"deployed_revisions"`
	} `json:"links"`
}

type V3AppsJSON added in v0.0.2

type V3AppsJSON struct {
	Pagination struct {
		Next struct {
			Href string `json:"href"`
		} `json:"next"`
	} `json:"pagination"`
	Apps []V3App `json:"resources"`
}

Partial structure of JSON when hitting the /v3/apps endpoint

type V3ErrorJSON added in v0.0.3

type V3ErrorJSON struct {
	Errors []struct {
		Detail string `json:"detail"`
		Title  string `json:"title"`
		Code   int    `json:"code"`
	} `json:"errors"`
}

Jump to

Keyboard shortcuts

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