package servicecontrol
import "google.golang.org/genproto/googleapis/api/servicecontrol/v2"
Index ¶
- Variables
- func RegisterServiceControllerServer(s *grpc.Server, srv ServiceControllerServer)
- type CheckRequest
- func (*CheckRequest) Descriptor() ([]byte, []int)
- func (x *CheckRequest) GetAttributes() *attribute_context.AttributeContext
- func (x *CheckRequest) GetFlags() string
- func (x *CheckRequest) GetResources() []*ResourceInfo
- func (x *CheckRequest) GetServiceConfigId() string
- func (x *CheckRequest) GetServiceName() string
- func (*CheckRequest) ProtoMessage()
- func (x *CheckRequest) ProtoReflect() protoreflect.Message
- func (x *CheckRequest) Reset()
- func (x *CheckRequest) String() string
- type CheckResponse
- func (*CheckResponse) Descriptor() ([]byte, []int)
- func (x *CheckResponse) GetHeaders() map[string]string
- func (x *CheckResponse) GetStatus() *status.Status
- func (*CheckResponse) ProtoMessage()
- func (x *CheckResponse) ProtoReflect() protoreflect.Message
- func (x *CheckResponse) Reset()
- func (x *CheckResponse) String() string
- type ReportRequest
- func (*ReportRequest) Descriptor() ([]byte, []int)
- func (x *ReportRequest) GetOperations() []*attribute_context.AttributeContext
- func (x *ReportRequest) GetServiceConfigId() string
- func (x *ReportRequest) GetServiceName() string
- func (*ReportRequest) ProtoMessage()
- func (x *ReportRequest) ProtoReflect() protoreflect.Message
- func (x *ReportRequest) Reset()
- func (x *ReportRequest) String() string
- type ReportResponse
- func (*ReportResponse) Descriptor() ([]byte, []int)
- func (*ReportResponse) ProtoMessage()
- func (x *ReportResponse) ProtoReflect() protoreflect.Message
- func (x *ReportResponse) Reset()
- func (x *ReportResponse) String() string
- type ResourceInfo
- func (*ResourceInfo) Descriptor() ([]byte, []int)
- func (x *ResourceInfo) GetContainer() string
- func (x *ResourceInfo) GetLocation() string
- func (x *ResourceInfo) GetName() string
- func (x *ResourceInfo) GetPermission() string
- func (x *ResourceInfo) GetType() string
- func (*ResourceInfo) ProtoMessage()
- func (x *ResourceInfo) ProtoReflect() protoreflect.Message
- func (x *ResourceInfo) Reset()
- func (x *ResourceInfo) String() string
- type ServiceControllerClient
- type ServiceControllerServer
- type UnimplementedServiceControllerServer
Variables ¶
var File_google_api_servicecontrol_v2_service_controller_proto protoreflect.FileDescriptor
Functions ¶
func RegisterServiceControllerServer ¶
func RegisterServiceControllerServer(s *grpc.Server, srv ServiceControllerServer)
Types ¶
type CheckRequest ¶
type CheckRequest struct { // The service name as specified in its service configuration. For example, // `"pubsub.googleapis.com"`. // // See // [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) // for the definition of a service name. ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // Specifies the version of the service configuration that should be used to // process the request. Must not be empty. Set this field to 'latest' to // specify using the latest configuration. ServiceConfigId string `protobuf:"bytes,2,opt,name=service_config_id,json=serviceConfigId,proto3" json:"service_config_id,omitempty"` // Describes attributes about the operation being executed by the service. Attributes *attribute_context.AttributeContext `protobuf:"bytes,3,opt,name=attributes,proto3" json:"attributes,omitempty"` // Describes the resources and the policies applied to each resource. Resources []*ResourceInfo `protobuf:"bytes,4,rep,name=resources,proto3" json:"resources,omitempty"` // Optional. Contains a comma-separated list of flags. Flags string `protobuf:"bytes,5,opt,name=flags,proto3" json:"flags,omitempty"` // contains filtered or unexported fields }
Request message for the Check method.
func (*CheckRequest) Descriptor ¶
func (*CheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
func (*CheckRequest) GetAttributes ¶
func (x *CheckRequest) GetAttributes() *attribute_context.AttributeContext
func (*CheckRequest) GetFlags ¶
func (x *CheckRequest) GetFlags() string
func (*CheckRequest) GetResources ¶
func (x *CheckRequest) GetResources() []*ResourceInfo
func (*CheckRequest) GetServiceConfigId ¶
func (x *CheckRequest) GetServiceConfigId() string
func (*CheckRequest) GetServiceName ¶
func (x *CheckRequest) GetServiceName() string
func (*CheckRequest) ProtoMessage ¶
func (*CheckRequest) ProtoMessage()
func (*CheckRequest) ProtoReflect ¶
func (x *CheckRequest) ProtoReflect() protoreflect.Message
func (*CheckRequest) Reset ¶
func (x *CheckRequest) Reset()
func (*CheckRequest) String ¶
func (x *CheckRequest) String() string
type CheckResponse ¶
type CheckResponse struct { // Operation is allowed when this field is not set. Any non-'OK' status // indicates a denial; [google.rpc.Status.details][google.rpc.Status.details] // would contain additional details about the denial. Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // Returns a set of request contexts generated from the `CheckRequest`. Headers map[string]string `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // contains filtered or unexported fields }
Response message for the Check method.
func (*CheckResponse) Descriptor ¶
func (*CheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.
func (*CheckResponse) GetHeaders ¶
func (x *CheckResponse) GetHeaders() map[string]string
func (*CheckResponse) GetStatus ¶
func (x *CheckResponse) GetStatus() *status.Status
func (*CheckResponse) ProtoMessage ¶
func (*CheckResponse) ProtoMessage()
func (*CheckResponse) ProtoReflect ¶
func (x *CheckResponse) ProtoReflect() protoreflect.Message
func (*CheckResponse) Reset ¶
func (x *CheckResponse) Reset()
func (*CheckResponse) String ¶
func (x *CheckResponse) String() string
type ReportRequest ¶
type ReportRequest struct { // The service name as specified in its service configuration. For example, // `"pubsub.googleapis.com"`. // // See // [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) // for the definition of a service name. ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // Specifies the version of the service configuration that should be used to // process the request. Must not be empty. Set this field to 'latest' to // specify using the latest configuration. ServiceConfigId string `protobuf:"bytes,2,opt,name=service_config_id,json=serviceConfigId,proto3" json:"service_config_id,omitempty"` // Describes the list of operations to be reported. Each operation is // represented as an AttributeContext, and contains all attributes around an // API access. Operations []*attribute_context.AttributeContext `protobuf:"bytes,3,rep,name=operations,proto3" json:"operations,omitempty"` // contains filtered or unexported fields }
Request message for the Report method.
func (*ReportRequest) Descriptor ¶
func (*ReportRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReportRequest.ProtoReflect.Descriptor instead.
func (*ReportRequest) GetOperations ¶
func (x *ReportRequest) GetOperations() []*attribute_context.AttributeContext
func (*ReportRequest) GetServiceConfigId ¶
func (x *ReportRequest) GetServiceConfigId() string
func (*ReportRequest) GetServiceName ¶
func (x *ReportRequest) GetServiceName() string
func (*ReportRequest) ProtoMessage ¶
func (*ReportRequest) ProtoMessage()
func (*ReportRequest) ProtoReflect ¶
func (x *ReportRequest) ProtoReflect() protoreflect.Message
func (*ReportRequest) Reset ¶
func (x *ReportRequest) Reset()
func (*ReportRequest) String ¶
func (x *ReportRequest) String() string
type ReportResponse ¶
type ReportResponse struct {
// contains filtered or unexported fields
}
Response message for the Report method. If the request contains any invalid data, the server returns an RPC error.
func (*ReportResponse) Descriptor ¶
func (*ReportResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReportResponse.ProtoReflect.Descriptor instead.
func (*ReportResponse) ProtoMessage ¶
func (*ReportResponse) ProtoMessage()
func (*ReportResponse) ProtoReflect ¶
func (x *ReportResponse) ProtoReflect() protoreflect.Message
func (*ReportResponse) Reset ¶
func (x *ReportResponse) Reset()
func (*ReportResponse) String ¶
func (x *ReportResponse) String() string
type ResourceInfo ¶
type ResourceInfo struct { // The name of the resource referenced in the request. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The resource type in the format of "{service}/{kind}". Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // The resource permission needed for this request. // The format must be "{service}/{plural}.{verb}". Permission string `protobuf:"bytes,3,opt,name=permission,proto3" json:"permission,omitempty"` // Optional. The identifier of the container of this resource. For Google // Cloud APIs, the resource container must be one of the following formats: // - `projects/<project-id or project-number>` // - `folders/<folder-id>` // - `organizations/<organization-id>` // For the policy enforcement on the container level (VPCSC and Location // Policy check), this field takes precedence on the container extracted from // name when presents. Container string `protobuf:"bytes,4,opt,name=container,proto3" json:"container,omitempty"` // Optional. The location of the resource. The value must be a valid zone, // region or multiregion. For example: "europe-west4" or // "northamerica-northeast1-a" Location string `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` // contains filtered or unexported fields }
Describes a resource referenced in the request.
func (*ResourceInfo) Descriptor ¶
func (*ResourceInfo) Descriptor() ([]byte, []int)
Deprecated: Use ResourceInfo.ProtoReflect.Descriptor instead.
func (*ResourceInfo) GetContainer ¶
func (x *ResourceInfo) GetContainer() string
func (*ResourceInfo) GetLocation ¶
func (x *ResourceInfo) GetLocation() string
func (*ResourceInfo) GetName ¶
func (x *ResourceInfo) GetName() string
func (*ResourceInfo) GetPermission ¶
func (x *ResourceInfo) GetPermission() string
func (*ResourceInfo) GetType ¶
func (x *ResourceInfo) GetType() string
func (*ResourceInfo) ProtoMessage ¶
func (*ResourceInfo) ProtoMessage()
func (*ResourceInfo) ProtoReflect ¶
func (x *ResourceInfo) ProtoReflect() protoreflect.Message
func (*ResourceInfo) Reset ¶
func (x *ResourceInfo) Reset()
func (*ResourceInfo) String ¶
func (x *ResourceInfo) String() string
type ServiceControllerClient ¶
type ServiceControllerClient interface { // Private Preview. This feature is only available for approved services. // // This method provides admission control for services that are integrated // with [Service // Infrastructure](https://cloud.google.com/service-infrastructure). It checks // whether an operation should be allowed based on the service configuration // and relevant policies. It must be called before the operation is executed. // For more information, see // [Admission // Control](https://cloud.google.com/service-infrastructure/docs/admission-control). // // NOTE: The admission control has an expected policy propagation delay of // 60s. The caller **must** not depend on the most recent policy changes. // // NOTE: The admission control has a hard limit of 1 referenced resources // per call. If an operation refers to more than 1 resources, the caller // must call the Check method multiple times. // // This method requires the `servicemanagement.services.check` permission // on the specified service. For more information, see // [Service Control API Access // Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) // Private Preview. This feature is only available for approved services. // // This method provides telemetry reporting for services that are integrated // with [Service // Infrastructure](https://cloud.google.com/service-infrastructure). It // reports a list of operations that have occurred on a service. It must be // called after the operations have been executed. For more information, see // [Telemetry // Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). // // NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB // per Report call. It is recommended to have no more than 100 operations per // call. // // This method requires the `servicemanagement.services.report` permission // on the specified service. For more information, see // [Service Control API Access // Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error) }
ServiceControllerClient is the client API for ServiceController service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceControllerClient ¶
func NewServiceControllerClient(cc grpc.ClientConnInterface) ServiceControllerClient
type ServiceControllerServer ¶
type ServiceControllerServer interface { // Private Preview. This feature is only available for approved services. // // This method provides admission control for services that are integrated // with [Service // Infrastructure](https://cloud.google.com/service-infrastructure). It checks // whether an operation should be allowed based on the service configuration // and relevant policies. It must be called before the operation is executed. // For more information, see // [Admission // Control](https://cloud.google.com/service-infrastructure/docs/admission-control). // // NOTE: The admission control has an expected policy propagation delay of // 60s. The caller **must** not depend on the most recent policy changes. // // NOTE: The admission control has a hard limit of 1 referenced resources // per call. If an operation refers to more than 1 resources, the caller // must call the Check method multiple times. // // This method requires the `servicemanagement.services.check` permission // on the specified service. For more information, see // [Service Control API Access // Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). Check(context.Context, *CheckRequest) (*CheckResponse, error) // Private Preview. This feature is only available for approved services. // // This method provides telemetry reporting for services that are integrated // with [Service // Infrastructure](https://cloud.google.com/service-infrastructure). It // reports a list of operations that have occurred on a service. It must be // called after the operations have been executed. For more information, see // [Telemetry // Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). // // NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB // per Report call. It is recommended to have no more than 100 operations per // call. // // This method requires the `servicemanagement.services.report` permission // on the specified service. For more information, see // [Service Control API Access // Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). Report(context.Context, *ReportRequest) (*ReportResponse, error) }
ServiceControllerServer is the server API for ServiceController service.
type UnimplementedServiceControllerServer ¶
type UnimplementedServiceControllerServer struct { }
UnimplementedServiceControllerServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceControllerServer) Check ¶
func (*UnimplementedServiceControllerServer) Check(context.Context, *CheckRequest) (*CheckResponse, error)
func (*UnimplementedServiceControllerServer) Report ¶
func (*UnimplementedServiceControllerServer) Report(context.Context, *ReportRequest) (*ReportResponse, error)
Source Files ¶
service_controller.pb.go
- Version
- v0.0.0-20250422160041-2d3770c4ea7f (latest)
- Published
- Apr 22, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 2 hours ago –
Tools for package owners.