presenter

package
v0.0.0-...-d88c78e Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APILink struct {
	Link
	Meta APILinkMeta `json:"meta"`
}

type APILinkMeta

type APILinkMeta struct {
	Version string `json:"version"`
}
type AppLinks struct {
	Self                 Link `json:"self"`
	Space                Link `json:"space"`
	Processes            Link `json:"processes"`
	Packages             Link `json:"packages"`
	EnvironmentVariables Link `json:"environment_variables"`
	CurrentDroplet       Link `json:"current_droplet"`
	Droplets             Link `json:"droplets"`
	Tasks                Link `json:"tasks"`
	StartAction          Link `json:"start"`
	StopAction           Link `json:"stop"`
	Revisions            Link `json:"revisions"`
	DeployedRevisions    Link `json:"deployed_revisions"`
	Features             Link `json:"features"`
}

type AppListResponse

type AppListResponse struct {
	PaginationData PaginationData `json:"pagination"`
	Resources      []AppResponse  `json:"resources"`
}

func ForAppList

func ForAppList(appRecordList []repositories.AppRecord, baseURL url.URL) AppListResponse

type AppResponse

type AppResponse struct {
	Name  string `json:"name"`
	GUID  string `json:"guid"`
	State string `json:"state"`

	CreatedAt     string        `json:"created_at"`
	UpdatedAt     string        `json:"updated_at"`
	Relationships Relationships `json:"relationships"`
	Lifecycle     Lifecycle     `json:"lifecycle"`
	Metadata      Metadata      `json:"metadata"`
	Links         AppLinks      `json:"links"`
}

func ForApp

func ForApp(responseApp repositories.AppRecord, baseURL url.URL) AppResponse

type BuildResponse

type BuildResponse struct {
	GUID            string                 `json:"guid"`
	CreatedAt       string                 `json:"created_at"`
	UpdatedAt       string                 `json:"updated_at"`
	CreatedBy       map[string]interface{} `json:"created_by"`
	State           string                 `json:"state"`
	StagingMemoryMB int                    `json:"staging_memory_in_mb"`
	StagingDiskMB   int                    `json:"staging_disk_in_mb"`
	Error           *string                `json:"error"`
	Lifecycle       Lifecycle              `json:"lifecycle"`
	Package         RelationshipData       `json:"package"`
	Droplet         *RelationshipData      `json:"droplet"`
	Relationships   Relationships          `json:"relationships"`
	Metadata        Metadata               `json:"metadata"`
	Links           map[string]Link        `json:"links"`
}

func ForBuild

func ForBuild(buildRecord repositories.BuildRecord, baseURL url.URL) BuildResponse

type BuildpackData

type BuildpackData struct {
	Name          string `json:"name"`
	DetectOutput  string `json:"detect_output"`
	BuildpackName string `json:"buildpack_name"`
	Version       string `json:"version"`
}

type ChecksumData

type ChecksumData struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}
type CurrentDropletLinks struct {
	Self    Link `json:"self"`
	Related Link `json:"related"`
}

type CurrentDropletResponse

type CurrentDropletResponse struct {
	Relationship `json:",inline"`
	Links        CurrentDropletLinks `json:"links"`
}

func ForCurrentDroplet

func ForCurrentDroplet(record repositories.CurrentDropletRecord, baseURL url.URL) CurrentDropletResponse

type DropletResponse

type DropletResponse struct {
	GUID              string            `json:"guid"`
	CreatedAt         string            `json:"created_at"`
	UpdatedAt         string            `json:"updated_at"`
	State             string            `json:"state"`
	Error             *string           `json:"error"`
	Lifecycle         Lifecycle         `json:"lifecycle"`
	ExecutionMetadata string            `json:"execution_metadata"`
	Checksum          *ChecksumData     `json:"checksum"`
	Buildpacks        []BuildpackData   `json:"buildpacks"`
	ProcessTypes      map[string]string `json:"process_types"`
	Stack             string            `json:"stack"`
	Image             *string           `json:"image"`
	Relationships     Relationships     `json:"relationships"`
	Metadata          Metadata          `json:"metadata"`
	Links             map[string]*Link  `json:"links"`
}

func ForDroplet

func ForDroplet(dropletRecord repositories.DropletRecord, baseURL url.URL) DropletResponse

type ErrorsResponse

type ErrorsResponse struct {
	Errors []PresentedError `json:"errors"`
}

type Lifecycle

type Lifecycle struct {
	Type string        `json:"type"`
	Data LifecycleData `json:"data"`
}

type LifecycleData

type LifecycleData struct {
	Buildpacks []string `json:"buildpacks"`
	Stack      string   `json:"stack"`
}
type Link struct {
	HREF   string `json:"href,omitempty"`
	Method string `json:"method,omitempty"`
}

type Metadata

type Metadata struct {
	Labels      map[string]string `json:"labels"`
	Annotations map[string]string `json:"annotations"`
}
type OrgLinks struct {
	Self          *Link `json:"self"`
	Domains       *Link `json:"domains,omitempty"`
	DefaultDomain *Link `json:"default_domain,omitempty"`
	Quota         *Link `json:"quota,omitempty"`
}

type OrgListResponse

type OrgListResponse struct {
	Pagination PaginationData `json:"pagination"`
	Resources  []OrgResponse  `json:"resources"`
}

func ForOrgList

func ForOrgList(orgs []repositories.OrgRecord, apiBaseURL url.URL) OrgListResponse

type OrgResponse

type OrgResponse struct {
	Name string `json:"name"`
	GUID string `json:"guid"`

	CreatedAt     string        `json:"created_at"`
	UpdatedAt     string        `json:"updated_at"`
	Suspended     bool          `json:"suspended"`
	Relationships Relationships `json:"relationships"`
	Metadata      Metadata      `json:"metadata"`
	Links         OrgLinks      `json:"links"`
}

func ForCreateOrg

func ForCreateOrg(org repositories.OrgRecord, apiBaseURL url.URL) OrgResponse

type PackageData

type PackageData struct{}
type PackageLinks struct {
	Self     Link `json:"self"`
	Upload   Link `json:"upload"`
	Download Link `json:"download"`
	App      Link `json:"app"`
}

type PackageResponse

type PackageResponse struct {
	GUID          string        `json:"guid"`
	Type          string        `json:"type"`
	Data          PackageData   `json:"data"`
	State         string        `json:"state"`
	Relationships Relationships `json:"relationships"`
	Links         PackageLinks  `json:"links"`
	Metadata      Metadata      `json:"metadata"`
	CreatedAt     string        `json:"created_at"`
	UpdatedAt     string        `json:"updated_at"`
}

func ForPackage

func ForPackage(record repositories.PackageRecord, baseURL url.URL) PackageResponse

type PageRef

type PageRef struct {
	HREF string `json:"href"`
}

type PaginationData

type PaginationData struct {
	TotalResults int     `json:"total_results"`
	TotalPages   int     `json:"total_pages"`
	First        PageRef `json:"first"`
	Last         PageRef `json:"last"`
	Next         *int    `json:"next"`
	Previous     *int    `json:"previous"`
}

type PresentedError

type PresentedError struct {
	Detail string `json:"detail"`
	Title  string `json:"title"`
	Code   int    `json:"code"`
}
type ProcessLinks struct {
	Self  Link `json:"self"`
	Scale Link `json:"scale"`
	App   Link `json:"app"`
	Space Link `json:"space"`
	Stats Link `json:"stats"`
}

type ProcessListResponse

type ProcessListResponse struct {
	PaginationData PaginationData    `json:"pagination"`
	Resources      []ProcessResponse `json:"resources"`
}

func ForProcessList

func ForProcessList(processRecordList []repositories.ProcessRecord, baseURL url.URL, appGUID string) ProcessListResponse

type ProcessResponse

type ProcessResponse struct {
	GUID          string                     `json:"guid"`
	Type          string                     `json:"type"`
	Command       string                     `json:"command"`
	Instances     int                        `json:"instances"`
	MemoryMB      int64                      `json:"memory_in_mb"`
	DiskQuotaMB   int64                      `json:"disk_in_mb"`
	HealthCheck   ProcessResponseHealthCheck `json:"health_check"`
	Relationships Relationships              `json:"relationships"`
	Metadata      Metadata                   `json:"metadata"`
	CreatedAt     string                     `json:"created_at"`
	UpdatedAt     string                     `json:"updated_at"`
	Links         ProcessLinks               `json:"links"`
}

func ForProcess

func ForProcess(responseProcess repositories.ProcessRecord, baseURL url.URL) ProcessResponse

type ProcessResponseHTTPHealthCheckData

type ProcessResponseHTTPHealthCheckData struct {
	Timeout           *int64 `json:"timeout"`
	InvocationTimeout *int64 `json:"invocation_timeout"`
	HTTPEndpoint      string `json:"endpoint"`
}

type ProcessResponseHealthCheck

type ProcessResponseHealthCheck struct {
	Type string                         `json:"type"`
	Data ProcessResponseHealthCheckData `json:"data"`
}

type ProcessResponseHealthCheckData

type ProcessResponseHealthCheckData struct {
	Type              string `json:"-"`
	Timeout           int64  `json:"timeout"`
	InvocationTimeout int64  `json:"invocation_timeout"`
	HTTPEndpoint      string `json:"endpoint"`
}

func (ProcessResponseHealthCheckData) MarshalJSON

func (h ProcessResponseHealthCheckData) MarshalJSON() ([]byte, error)

type ProcessResponsePortHealthCheckData

type ProcessResponsePortHealthCheckData struct {
	Timeout           *int64 `json:"timeout"`
	InvocationTimeout *int64 `json:"invocation_timeout"`
}

type ProcessResponseProcessHealthCheckData

type ProcessResponseProcessHealthCheckData struct {
	Timeout *int64 `json:"timeout"`
}

type Relationship

type Relationship struct {
	Data RelationshipData `json:"data"`
}

type RelationshipData

type RelationshipData struct {
	GUID string `json:"guid"`
}

type Relationships

type Relationships map[string]Relationship

type RootResponse

type RootResponse struct {
	Links   map[string]*APILink `json:"links"`
	CFOnK8s bool                `json:"cf_on_k8s"`
}

func GetRootResponse

func GetRootResponse(serverURL string) RootResponse

type RouteDestinationsResponse

type RouteDestinationsResponse struct {
	Destinations []routeDestination     `json:"destinations"`
	Links        routeDestinationsLinks `json:"links"`
}

func ForRouteDestinations

func ForRouteDestinations(route repositories.RouteRecord, baseURL url.URL) RouteDestinationsResponse

type RouteListResponse

type RouteListResponse struct {
	PaginationData PaginationData  `json:"pagination"`
	Resources      []RouteResponse `json:"resources"`
}

func ForAppRouteList

func ForAppRouteList(routeRecordList []repositories.RouteRecord, baseURL url.URL, appGUID string) RouteListResponse

func ForRouteList

func ForRouteList(routeRecordList []repositories.RouteRecord, baseURL url.URL) RouteListResponse

type RouteResponse

type RouteResponse struct {
	GUID         string             `json:"guid"`
	Protocol     string             `json:"protocol"`
	Port         *int               `json:"port"`
	Host         string             `json:"host"`
	Path         string             `json:"path"`
	URL          string             `json:"url"`
	Destinations []routeDestination `json:"destinations"`

	CreatedAt     string        `json:"created_at"`
	UpdatedAt     string        `json:"updated_at"`
	Relationships Relationships `json:"relationships"`
	Metadata      Metadata      `json:"metadata"`
	Links         routeLinks    `json:"links"`
}

func ForRoute

func ForRoute(route repositories.RouteRecord, baseURL url.URL) RouteResponse
type SpaceLinks struct {
	Self         *Link `json:"self"`
	Organization *Link `json:"organization"`
}

type SpaceListResponse

type SpaceListResponse struct {
	Pagination PaginationData  `json:"pagination"`
	Resources  []SpaceResponse `json:"resources"`
}

func ForSpaceList

func ForSpaceList(spaces []repositories.SpaceRecord, apiBaseURL url.URL) SpaceListResponse

type SpaceResponse

type SpaceResponse struct {
	Name          string        `json:"name"`
	GUID          string        `json:"guid"`
	CreatedAt     string        `json:"created_at"`
	UpdatedAt     string        `json:"updated_at"`
	Links         SpaceLinks    `json:"links"`
	Metadata      Metadata      `json:"metadata"`
	Relationships Relationships `json:"relationships"`
}

func ForCreateSpace

func ForCreateSpace(space repositories.SpaceRecord, apiBaseURL url.URL) SpaceResponse

Jump to

Keyboard shortcuts

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