Documentation
¶
Overview ¶
THIS FILE IS AUTOGENERATED USING go generate. DO NOT EDIT.
Index ¶
- Constants
- type AccessBinding
- type ApiHandle
- type Binding
- type Condition
- type Dataset
- type DatasetResource
- func (r *DatasetResource) GetConfig() *RestResource
- func (r *DatasetResource) GetIamPolicy(ctx context.Context, h *ApiHandle) (*Policy, error)
- func (r *DatasetResource) GetRelativeId() *gcputil.RelativeResourceName
- func (r *DatasetResource) SetIamPolicy(ctx context.Context, h *ApiHandle, p *Policy) (*Policy, error)
- type GeneratedResources
- type IamResource
- func (r *IamResource) GetConfig() *RestResource
- func (r *IamResource) GetIamPolicy(ctx context.Context, h *ApiHandle) (*Policy, error)
- func (r *IamResource) GetRelativeId() *gcputil.RelativeResourceName
- func (r *IamResource) SetIamPolicy(ctx context.Context, h *ApiHandle, p *Policy) (*Policy, error)
- type Policy
- type PolicyDelta
- type Resource
- type ResourceParser
- type RestMethod
- type RestResource
Constants ¶
const (
ServiceAccountMemberTmpl = "serviceAccount:%s"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessBinding ¶ added in v0.6.2
type AccessBinding struct {
Role string `json:"role,omitempty"`
UserByEmail string `json:"userByEmail,omitempty"`
GroupByEmail string `json:"groupByEmail,omitempty"`
}
NOTE: BigQuery does not conform to the typical REST for IAM policies instead it has an access array with bindings on the dataset object. https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#Dataset
type ApiHandle ¶ added in v0.6.2
type ApiHandle struct {
// contains filtered or unexported fields
}
func GetApiHandle ¶ added in v0.6.2
func (*ApiHandle) DoGetRequest ¶ added in v0.6.2
type Dataset ¶ added in v0.6.2
type Dataset struct {
Access []*AccessBinding `json:"access,omitempty"`
Etag string `json:"etag,omitempty"`
}
type DatasetResource ¶ added in v0.6.2
type DatasetResource struct {
// contains filtered or unexported fields
}
NOTE: DatasetResource implements IamResource. This is because bigquery datasets have their own ACLs instead of an IAM policy
func (*DatasetResource) GetConfig ¶ added in v0.6.2
func (r *DatasetResource) GetConfig() *RestResource
func (*DatasetResource) GetIamPolicy ¶ added in v0.6.2
func (*DatasetResource) GetRelativeId ¶ added in v0.6.2
func (r *DatasetResource) GetRelativeId() *gcputil.RelativeResourceName
func (*DatasetResource) SetIamPolicy ¶ added in v0.6.2
type GeneratedResources ¶
type GeneratedResources map[string]map[string]map[string]RestResource
GeneratedResources implements ResourceParser - a value is generated using internal/generate_iam.go
func GetEnabledResources ¶ added in v0.6.2
func GetEnabledResources() GeneratedResources
func (GeneratedResources) GetRestConfig ¶
func (apis GeneratedResources) GetRestConfig(rawName string, fullName *gcputil.FullResourceName, prefix string) (*RestResource, error)
type IamResource ¶
type IamResource struct {
// contains filtered or unexported fields
}
IamResource implements Resource.
func (*IamResource) GetConfig ¶ added in v0.6.2
func (r *IamResource) GetConfig() *RestResource
func (*IamResource) GetIamPolicy ¶ added in v0.6.2
func (*IamResource) GetRelativeId ¶ added in v0.6.2
func (r *IamResource) GetRelativeId() *gcputil.RelativeResourceName
func (*IamResource) SetIamPolicy ¶ added in v0.6.2
type Policy ¶
type Policy struct {
Bindings []*Binding `json:"bindings,omitempty"`
Etag string `json:"etag,omitempty"`
Version int `json:"version,omitempty"`
}
func (*Policy) AddBindings ¶
func (p *Policy) AddBindings(toAdd *PolicyDelta) (changed bool, updated *Policy)
func (*Policy) ChangeBindings ¶ added in v0.10.1
func (p *Policy) ChangeBindings(toAdd *PolicyDelta, toRemove *PolicyDelta) (changed bool, updated *Policy)
func (*Policy) RemoveBindings ¶
func (p *Policy) RemoveBindings(toRemove *PolicyDelta) (changed bool, updated *Policy)
type PolicyDelta ¶
type Resource ¶ added in v0.6.2
type Resource interface {
GetIamPolicy(context.Context, *ApiHandle) (*Policy, error)
SetIamPolicy(context.Context, *ApiHandle, *Policy) (*Policy, error)
GetConfig() *RestResource
GetRelativeId() *gcputil.RelativeResourceName
}
Resource handles constructing HTTP requests for getting and setting IAM policies.
type ResourceParser ¶ added in v0.6.2
ResourceParser handles parsing resource ID and REST config from a given resource ID or name.
type RestMethod ¶
type RestResource ¶ added in v0.6.2
type RestResource struct {
// Name is the base name of the resource
// i.e. for a GCE instance: "instance"
Name string
// TypeKey is the identifying path for the resource, or
// the RESTful resource identifier without resource IDs
// i.e. For a GCE instance: "projects/zones/instances"
TypeKey string
// Service is the name of the service this resource belongs to.
Service string
// IsPreferredVersion is true if this version of the API/resource is preferred.
IsPreferredVersion bool
// HTTP metadata for getting Policy data in GCP
GetMethod RestMethod
// HTTP metadata for setting Policy data in GCP
SetMethod RestMethod
// Ordered parameters to be replaced in method paths
Parameters []string
// Mapping of collection ids onto the parameter to be replaced
CollectionReplacementKeys map[string]string
}