meta

package
v1.28.11 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 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(
	"Address",
	"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 DefaultZonalServices = sets.NewString(
	"NetworkEndpointGroup",
)
View Source
var GroupResourceServices = map[string]*GroupResourceInfo{
	"NetworkEndpointGroup": &GroupResourceInfo{
		AttachFuncName:  "AttachNetworkEndpoints",
		DetachFuncName:  "DetachNetworkEndpoints",
		AttachReqName:   "NetworkEndpointGroupsAttachEndpointsRequest",
		DetachReqName:   "NetworkEndpointGroupsDetachEndpointsRequest",
		ListFuncName:    "ListNetworkEndpoints",
		ListReqName:     "NetworkEndpointGroupsListEndpointsRequest",
		ListRespName:    "NetworkEndpointWithHealthStatus",
		AggListFuncName: "AggregatedList",
		AggListRespName: "NetworkEndpointGroup",
	},
}

GroupResourceServices support adding/removing objects from them. Examples are Instance Groups, NetworkEndpointGroups. Additional APIs to Attach/Detach objects will be created for these services.

View Source
var MainServices = map[string]string{
	"Address":                         "Addresses",
	"BackendService":                  "BackendServices",
	"ForwardingRule":                  "ForwardingRules",
	"HealthCheck":                     "HealthChecks",
	"HealthStatusForNetworkEndpoint":  "HealthStatusForNetworkEndpoints",
	"UrlMap":                          "UrlMaps",
	"TargetHttpProxy":                 "TargetHttpProxies",
	"TargetHttpsProxy":                "TargetHttpsProxies",
	"SslCertificate":                  "SslCertificates",
	"NetworkEndpointGroup":            "NetworkEndpointGroups",
	"NetworkEndpoint":                 "NetworkEndpoints",
	"NetworkEndpointWithHealthStatus": "NetworkEndpointsWithHealthStatus",
	"NetworkEndpointGroupsAttachEndpointsRequest": "NetworkEndpointGroupsAttachEndpointsRequests",
	"NetworkEndpointGroupsDetachEndpointsRequest": "NetworkEndpointGroupsDetachEndpointsRequests",
	"NetworkEndpointGroupsListEndpointsRequest":   "NetworkEndpointGroupsListEndpointsRequests",
	"SignedUrlKey": "SignedUrlKey",
}

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 NoCRUD = sets.NewString(
	"HealthStatusForNetworkEndpoint",
	"NetworkEndpointGroupsAttachEndpointsRequest",
	"NetworkEndpointGroupsDetachEndpointsRequest",
	"NetworkEndpointGroupsListEndpointsRequest",
	"NetworkEndpoint",
	"NetworkEndpointWithHealthStatus",
	"SignedUrlKey",
)

Services in NoCRUD will not have Create, Get, Delete, Update, methods generated for them

View Source
var NoUpdate = sets.NewString(
	"Address",
	"ForwardingRule",
	"HealthStatusForNetworkEndpoint",
	"TargetHttpProxy",
	"TargetHttpsProxy",
	"SslCertificate",
	"NetworkEndpointGroup",
	"NetworkEndpoint",
	"NetworkEndpointWithHealthStatus",
	"SignedUrlKey",
)

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) GetGroupResourceInfo added in v1.8.0

func (apiService *ApiService) GetGroupResourceInfo() *GroupResourceInfo

func (*ApiService) HasCRUD added in v1.8.0

func (apiService *ApiService) HasCRUD() bool

HasCRUD() returns true if the service name is *not* in the NoCRUD() list

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) IsDefaultZonalService added in v1.8.0

func (apiService *ApiService) IsDefaultZonalService() bool

func (*ApiService) IsGroupResourceService added in v1.8.0

func (apiService *ApiService) IsGroupResourceService() bool

func (*ApiService) IsMainService

func (apiService *ApiService) IsMainService() bool

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

type GroupResourceInfo added in v1.8.0

type GroupResourceInfo struct {
	AttachFuncName  string
	DetachFuncName  string
	ListFuncName    string
	AggListFuncName string
	AttachReqName   string
	DetachReqName   string
	ListReqName     string
	ListRespName    string
	AggListRespName string
}

Jump to

Keyboard shortcuts

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