Documentation ¶
Index ¶
- Variables
- type Visibility
- type VisibilityRule
- func (*VisibilityRule) Descriptor() ([]byte, []int)deprecated
- func (x *VisibilityRule) GetRestriction() string
- func (x *VisibilityRule) GetSelector() string
- func (*VisibilityRule) ProtoMessage()
- func (x *VisibilityRule) ProtoReflect() protoreflect.Message
- func (x *VisibilityRule) Reset()
- func (x *VisibilityRule) String() string
Constants ¶
This section is empty.
Variables ¶
var ( // See `VisibilityRule`. // // optional google.api.VisibilityRule api_visibility = 72295727; E_ApiVisibility = &file_google_api_visibility_proto_extTypes[5] )
Extension fields to descriptorpb.ServiceOptions.
var ( // See `VisibilityRule`. // // optional google.api.VisibilityRule enum_visibility = 72295727; E_EnumVisibility = &file_google_api_visibility_proto_extTypes[0] )
Extension fields to descriptorpb.EnumOptions.
var ( // See `VisibilityRule`. // // optional google.api.VisibilityRule field_visibility = 72295727; E_FieldVisibility = &file_google_api_visibility_proto_extTypes[2] )
Extension fields to descriptorpb.FieldOptions.
var ( // See `VisibilityRule`. // // optional google.api.VisibilityRule message_visibility = 72295727; E_MessageVisibility = &file_google_api_visibility_proto_extTypes[3] )
Extension fields to descriptorpb.MessageOptions.
var ( // See `VisibilityRule`. // // optional google.api.VisibilityRule method_visibility = 72295727; E_MethodVisibility = &file_google_api_visibility_proto_extTypes[4] )
Extension fields to descriptorpb.MethodOptions.
var ( // See `VisibilityRule`. // // optional google.api.VisibilityRule value_visibility = 72295727; E_ValueVisibility = &file_google_api_visibility_proto_extTypes[1] )
Extension fields to descriptorpb.EnumValueOptions.
var File_google_api_visibility_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Visibility ¶
type Visibility struct { // A list of visibility rules that apply to individual API elements. // // **NOTE:** All service configuration rules follow "last one wins" order. Rules []*VisibilityRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` // contains filtered or unexported fields }
`Visibility` restricts service consumer's access to service elements, such as whether an application can call a visibility-restricted method. The restriction is expressed by applying visibility labels on service elements. The visibility labels are elsewhere linked to service consumers.
A service can define multiple visibility labels, but a service consumer should be granted at most one visibility label. Multiple visibility labels for a single service consumer are not supported.
If an element and all its parents have no visibility label, its visibility is unconditionally granted.
Example:
visibility: rules: - selector: google.calendar.Calendar.EnhancedSearch restriction: PREVIEW - selector: google.calendar.Calendar.Delegate restriction: INTERNAL
Here, all methods are publicly visible except for the restricted methods EnhancedSearch and Delegate.
func (*Visibility) Descriptor
deprecated
func (*Visibility) Descriptor() ([]byte, []int)
Deprecated: Use Visibility.ProtoReflect.Descriptor instead.
func (*Visibility) GetRules ¶
func (x *Visibility) GetRules() []*VisibilityRule
func (*Visibility) ProtoMessage ¶
func (*Visibility) ProtoMessage()
func (*Visibility) ProtoReflect ¶
func (x *Visibility) ProtoReflect() protoreflect.Message
func (*Visibility) Reset ¶
func (x *Visibility) Reset()
func (*Visibility) String ¶
func (x *Visibility) String() string
type VisibilityRule ¶
type VisibilityRule struct { // Selects methods, messages, fields, enums, etc. to which this rule applies. // // Refer to [selector][google.api.DocumentationRule.selector] for syntax // details. Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` // A comma-separated list of visibility labels that apply to the `selector`. // Any of the listed labels can be used to grant the visibility. // // If a rule has multiple labels, removing one of the labels but not all of // them can break clients. // // Example: // // visibility: // rules: // - selector: google.calendar.Calendar.EnhancedSearch // restriction: INTERNAL, PREVIEW // // Removing INTERNAL from this restriction will break clients that rely on // this method and only had access to it through INTERNAL. Restriction string `protobuf:"bytes,2,opt,name=restriction,proto3" json:"restriction,omitempty"` // contains filtered or unexported fields }
A visibility rule provides visibility configuration for an individual API element.
func (*VisibilityRule) Descriptor
deprecated
func (*VisibilityRule) Descriptor() ([]byte, []int)
Deprecated: Use VisibilityRule.ProtoReflect.Descriptor instead.
func (*VisibilityRule) GetRestriction ¶
func (x *VisibilityRule) GetRestriction() string
func (*VisibilityRule) GetSelector ¶
func (x *VisibilityRule) GetSelector() string
func (*VisibilityRule) ProtoMessage ¶
func (*VisibilityRule) ProtoMessage()
func (*VisibilityRule) ProtoReflect ¶
func (x *VisibilityRule) ProtoReflect() protoreflect.Message
func (*VisibilityRule) Reset ¶
func (x *VisibilityRule) Reset()
func (*VisibilityRule) String ¶
func (x *VisibilityRule) String() string