visibility

package
v0.0.0-...-6cb3ea0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// See `VisibilityRule`.
	//
	// optional google.api.VisibilityRule api_visibility = 72295727;
	E_ApiVisibility = &file_google_api_visibility_proto_extTypes[5]
)

Extension fields to descriptorpb.ServiceOptions.

View Source
var (
	// See `VisibilityRule`.
	//
	// optional google.api.VisibilityRule enum_visibility = 72295727;
	E_EnumVisibility = &file_google_api_visibility_proto_extTypes[0]
)

Extension fields to descriptorpb.EnumOptions.

View Source
var (
	// See `VisibilityRule`.
	//
	// optional google.api.VisibilityRule field_visibility = 72295727;
	E_FieldVisibility = &file_google_api_visibility_proto_extTypes[2]
)

Extension fields to descriptorpb.FieldOptions.

View Source
var (
	// See `VisibilityRule`.
	//
	// optional google.api.VisibilityRule message_visibility = 72295727;
	E_MessageVisibility = &file_google_api_visibility_proto_extTypes[3]
)

Extension fields to descriptorpb.MessageOptions.

View Source
var (
	// See `VisibilityRule`.
	//
	// optional google.api.VisibilityRule method_visibility = 72295727;
	E_MethodVisibility = &file_google_api_visibility_proto_extTypes[4]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var (
	// See `VisibilityRule`.
	//
	// optional google.api.VisibilityRule value_visibility = 72295727;
	E_ValueVisibility = &file_google_api_visibility_proto_extTypes[1]
)

Extension fields to descriptorpb.EnumValueOptions.

View Source
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` defines restrictions for the visibility of service elements. Restrictions are specified using visibility labels (e.g., PREVIEW) that are elsewhere linked to users and projects.

Users and projects can have access to more than one visibility label. The effective visibility for multiple labels is the union of each label's elements, plus any unrestricted elements.

If an element and its parents have no restrictions, 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

Jump to

Keyboard shortcuts

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