Documentation ¶
Index ¶
- Variables
- type ApiService
- func (apiService *ApiService) GetCloudProviderName() string
- func (apiService *ApiService) GetGroupResourceInfo() *GroupResourceInfo
- func (apiService *ApiService) HasCRUD() bool
- func (apiService *ApiService) HasUpdate() bool
- func (apiService *ApiService) IsDefaultRegionalService() bool
- func (apiService *ApiService) IsDefaultZonalService() bool
- func (apiService *ApiService) IsGroupResourceService() bool
- func (apiService *ApiService) IsMainService() bool
- type GroupResourceInfo
Constants ¶
This section is empty.
Variables ¶
var AllApiServices []ApiService
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)
var DefaultZonalServices = sets.NewString(
"NetworkEndpointGroup",
)
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.
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
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
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
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