meta

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllApiServices []ApiService
View Source
var DefaultRegionalServices = sets.NewString(
	"ForwardingRule",
)

TODO (shance) Replace this with data gathered from meta.AllServices or discovery doc DefaultRegionalServices contains services which are regional by default. Their global type is explicitly labeled (e.g. GlobalForwardingRule)

View Source
var MainServices = map[string]string{
	"BackendService":   "BackendServices",
	"ForwardingRule":   "ForwardingRules",
	"HealthCheck":      "HealthChecks",
	"UrlMap":           "UrlMaps",
	"TargetHttpProxy":  "TargetHttpProxies",
	"TargetHttpsProxy": "TargetHttpsProxies",
}

MainServices describes all of the API types that we want to define all the helper functions for The other types that are discovered as dependencies will simply be wrapped with a composite struct The format of the map is ServiceName -> k8s-cloud-provider wrapper name

View Source
var NoUpdate = sets.NewString(
	"ForwardingRule",
	"TargetHttpProxy",
	"TargetHttpsProxy",
)

TODO: (shance) Replace this with data gathered from meta.AllServices Services in NoUpdate will not have an Update() method generated for them

View Source
var Versions = map[string]string{
	"Alpha": "alpha",
	"Beta":  "beta",
	"GA":    "",
}

Functions

This section is empty.

Types

type ApiService

type ApiService struct {
	// Name of the Go struct
	Name string
	// Name used in the Json tag for marshalling/unmarshalling
	JsonName string
	// Force JSON tag as string type
	JsonStringOverride bool
	// Golang type
	GoType string
	// Name to use when creating an instance of this type
	VarName string
	// All of the struct fields
	Fields []ApiService
	// Comment describing the field
	Description string
}

ApiService holds relevant data for generating a composite type + helper methods for a single API service

func (*ApiService) GetCloudProviderName

func (apiService *ApiService) GetCloudProviderName() string

GetCloudProviderName() returns the name of the cloudprovider type for a service

func (*ApiService) HasUpdate

func (apiService *ApiService) HasUpdate() bool

HasUpdate() returns true if the service name is *not* in the NoUpdate() list

func (*ApiService) IsDefaultRegionalService

func (apiService *ApiService) IsDefaultRegionalService() bool

func (*ApiService) IsMainService

func (apiService *ApiService) IsMainService() bool

IsMainService() returns true if the service name is in the MainServices map

Jump to

Keyboard shortcuts

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