genproto: google.golang.org/genproto/googleapis/rpc/context/attribute_context Index | Files

package attribute_context

import "google.golang.org/genproto/googleapis/rpc/context/attribute_context"

Index

Package Files

attribute_context.pb.go

Variables

var File_google_rpc_context_attribute_context_proto protoreflect.FileDescriptor

type AttributeContext Uses

type AttributeContext struct {

    // The origin of a network activity. In a multi hop network activity,
    // the origin represents the sender of the first hop. For the first hop,
    // the `source` and the `origin` must have the same content.
    Origin *AttributeContext_Peer `protobuf:"bytes,7,opt,name=origin,proto3" json:"origin,omitempty"`
    // The source of a network activity, such as starting a TCP connection.
    // In a multi hop network activity, the source represents the sender of the
    // last hop.
    Source *AttributeContext_Peer `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
    // The destination of a network activity, such as accepting a TCP connection.
    // In a multi hop network activity, the destination represents the receiver of
    // the last hop.
    Destination *AttributeContext_Peer `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
    // Represents a network request, such as an HTTP request.
    Request *AttributeContext_Request `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
    // Represents a network response, such as an HTTP response.
    Response *AttributeContext_Response `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
    // Represents a target resource that is involved with a network activity.
    // If multiple resources are involved with an activity, this must be the
    // primary one.
    Resource *AttributeContext_Resource `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"`
    // Represents an API operation that is involved to a network activity.
    Api *AttributeContext_Api `protobuf:"bytes,6,opt,name=api,proto3" json:"api,omitempty"`
    // Supports extensions for advanced use cases, such as logs and metrics.
    Extensions []*any.Any `protobuf:"bytes,8,rep,name=extensions,proto3" json:"extensions,omitempty"`
    // contains filtered or unexported fields
}

This message defines the standard attribute vocabulary for Google APIs.

An attribute is a piece of metadata that describes an activity on a network service. For example, the size of an HTTP request, or the status code of an HTTP response.

Each attribute has a type and a name, which is logically defined as a proto message field in `AttributeContext`. The field type becomes the attribute type, and the field path becomes the attribute name. For example, the attribute `source.ip` maps to field `AttributeContext.source.ip`.

This message definition is guaranteed not to have any wire breaking change. So you can use it directly for passing attributes across different systems.

NOTE: Different system may generate different subset of attributes. Please verify the system specification before relying on an attribute generated a system.

func (*AttributeContext) Descriptor Uses

func (*AttributeContext) Descriptor() ([]byte, []int)

Deprecated: Use AttributeContext.ProtoReflect.Descriptor instead.

func (*AttributeContext) GetApi Uses

func (x *AttributeContext) GetApi() *AttributeContext_Api

func (*AttributeContext) GetDestination Uses

func (x *AttributeContext) GetDestination() *AttributeContext_Peer

func (*AttributeContext) GetExtensions Uses

func (x *AttributeContext) GetExtensions() []*any.Any

func (*AttributeContext) GetOrigin Uses

func (x *AttributeContext) GetOrigin() *AttributeContext_Peer

func (*AttributeContext) GetRequest Uses

func (x *AttributeContext) GetRequest() *AttributeContext_Request

func (*AttributeContext) GetResource Uses

func (x *AttributeContext) GetResource() *AttributeContext_Resource

func (*AttributeContext) GetResponse Uses

func (x *AttributeContext) GetResponse() *AttributeContext_Response

func (*AttributeContext) GetSource Uses

func (x *AttributeContext) GetSource() *AttributeContext_Peer

func (*AttributeContext) ProtoMessage Uses

func (*AttributeContext) ProtoMessage()

func (*AttributeContext) ProtoReflect Uses

func (x *AttributeContext) ProtoReflect() protoreflect.Message

func (*AttributeContext) Reset Uses

func (x *AttributeContext) Reset()

func (*AttributeContext) String Uses

func (x *AttributeContext) String() string

type AttributeContext_Api Uses

type AttributeContext_Api struct {

    // The API service name. It is a logical identifier for a networked API,
    // such as "pubsub.googleapis.com". The naming syntax depends on the
    // API management system being used for handling the request.
    Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
    // The API operation name. For gRPC requests, it is the fully qualified API
    // method name, such as "google.pubsub.v1.Publisher.Publish". For OpenAPI
    // requests, it is the `operationId`, such as "getPet".
    Operation string `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"`
    // The API protocol used for sending the request, such as "http", "https",
    // "grpc", or "internal".
    Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
    // The API version associated with the API operation above, such as "v1" or
    // "v1alpha1".
    Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
    // contains filtered or unexported fields
}

This message defines attributes associated with API operations, such as a network API request. The terminology is based on the conventions used by Google APIs, Istio, and OpenAPI.

func (*AttributeContext_Api) Descriptor Uses

func (*AttributeContext_Api) Descriptor() ([]byte, []int)

Deprecated: Use AttributeContext_Api.ProtoReflect.Descriptor instead.

func (*AttributeContext_Api) GetOperation Uses

func (x *AttributeContext_Api) GetOperation() string

func (*AttributeContext_Api) GetProtocol Uses

func (x *AttributeContext_Api) GetProtocol() string

func (*AttributeContext_Api) GetService Uses

func (x *AttributeContext_Api) GetService() string

func (*AttributeContext_Api) GetVersion Uses

func (x *AttributeContext_Api) GetVersion() string

func (*AttributeContext_Api) ProtoMessage Uses

func (*AttributeContext_Api) ProtoMessage()

func (*AttributeContext_Api) ProtoReflect Uses

func (x *AttributeContext_Api) ProtoReflect() protoreflect.Message

func (*AttributeContext_Api) Reset Uses

func (x *AttributeContext_Api) Reset()

func (*AttributeContext_Api) String Uses

func (x *AttributeContext_Api) String() string

type AttributeContext_Auth Uses

type AttributeContext_Auth struct {

    // The authenticated principal. Reflects the issuer (`iss`) and subject
    // (`sub`) claims within a JWT. The issuer and subject should be `/`
    // delimited, with `/` percent-encoded within the subject fragment. For
    // Google accounts, the principal format is:
    // "https://accounts.google.com/{id}"
    Principal string `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"`
    // The intended audience(s) for this authentication information. Reflects
    // the audience (`aud`) claim within a JWT. The audience
    // value(s) depends on the `issuer`, but typically include one or more of
    // the following pieces of information:
    //
    // *  The services intended to receive the credential. For example,
    //    ["https://pubsub.googleapis.com/", "https://storage.googleapis.com/"].
    // *  A set of service-based scopes. For example,
    //    ["https://www.googleapis.com/auth/cloud-platform"].
    // *  The client id of an app, such as the Firebase project id for JWTs
    //    from Firebase Auth.
    //
    // Consult the documentation for the credential issuer to determine the
    // information provided.
    Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"`
    // The authorized presenter of the credential. Reflects the optional
    // Authorized Presenter (`azp`) claim within a JWT or the
    // OAuth client id. For example, a Google Cloud Platform client id looks
    // as follows: "123456789012.apps.googleusercontent.com".
    Presenter string `protobuf:"bytes,3,opt,name=presenter,proto3" json:"presenter,omitempty"`
    // Structured claims presented with the credential. JWTs include
    // `{key: value}` pairs for standard and private claims. The following
    // is a subset of the standard required and optional claims that would
    // typically be presented for a Google-based JWT:
    //
    //    {'iss': 'accounts.google.com',
    //     'sub': '113289723416554971153',
    //     'aud': ['123456789012', 'pubsub.googleapis.com'],
    //     'azp': '123456789012.apps.googleusercontent.com',
    //     'email': 'jsmith@example.com',
    //     'iat': 1353601026,
    //     'exp': 1353604926}
    //
    // SAML assertions are similarly specified, but with an identity provider
    // dependent structure.
    Claims *_struct.Struct `protobuf:"bytes,4,opt,name=claims,proto3" json:"claims,omitempty"`
    // A list of access level resource names that allow resources to be
    // accessed by authenticated requester. It is part of Secure GCP processing
    // for the incoming request. An access level string has the format:
    // "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}"
    //
    // Example:
    // "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"
    AccessLevels []string `protobuf:"bytes,5,rep,name=access_levels,json=accessLevels,proto3" json:"access_levels,omitempty"`
    // contains filtered or unexported fields
}

This message defines request authentication attributes. Terminology is based on the JSON Web Token (JWT) standard, but the terms also correlate to concepts in other standards.

func (*AttributeContext_Auth) Descriptor Uses

func (*AttributeContext_Auth) Descriptor() ([]byte, []int)

Deprecated: Use AttributeContext_Auth.ProtoReflect.Descriptor instead.

func (*AttributeContext_Auth) GetAccessLevels Uses

func (x *AttributeContext_Auth) GetAccessLevels() []string

func (*AttributeContext_Auth) GetAudiences Uses

func (x *AttributeContext_Auth) GetAudiences() []string

func (*AttributeContext_Auth) GetClaims Uses

func (x *AttributeContext_Auth) GetClaims() *_struct.Struct

func (*AttributeContext_Auth) GetPresenter Uses

func (x *AttributeContext_Auth) GetPresenter() string

func (*AttributeContext_Auth) GetPrincipal Uses

func (x *AttributeContext_Auth) GetPrincipal() string

func (*AttributeContext_Auth) ProtoMessage Uses

func (*AttributeContext_Auth) ProtoMessage()

func (*AttributeContext_Auth) ProtoReflect Uses

func (x *AttributeContext_Auth) ProtoReflect() protoreflect.Message

func (*AttributeContext_Auth) Reset Uses

func (x *AttributeContext_Auth) Reset()

func (*AttributeContext_Auth) String Uses

func (x *AttributeContext_Auth) String() string

type AttributeContext_Peer Uses

type AttributeContext_Peer struct {

    // The IP address of the peer.
    Ip  string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
    // The network port of the peer.
    Port int64 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
    // The labels associated with the peer.
    Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // The identity of this peer. Similar to `Request.auth.principal`, but
    // relative to the peer instead of the request. For example, the
    // idenity associated with a load balancer that forwared the request.
    Principal string `protobuf:"bytes,7,opt,name=principal,proto3" json:"principal,omitempty"`
    // The CLDR country/region code associated with the above IP address.
    // If the IP address is private, the `region_code` should reflect the
    // physical location where this peer is running.
    RegionCode string `protobuf:"bytes,8,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"`
    // contains filtered or unexported fields
}

This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.

func (*AttributeContext_Peer) Descriptor Uses

func (*AttributeContext_Peer) Descriptor() ([]byte, []int)

Deprecated: Use AttributeContext_Peer.ProtoReflect.Descriptor instead.

func (*AttributeContext_Peer) GetIp Uses

func (x *AttributeContext_Peer) GetIp() string

func (*AttributeContext_Peer) GetLabels Uses

func (x *AttributeContext_Peer) GetLabels() map[string]string

func (*AttributeContext_Peer) GetPort Uses

func (x *AttributeContext_Peer) GetPort() int64

func (*AttributeContext_Peer) GetPrincipal Uses

func (x *AttributeContext_Peer) GetPrincipal() string

func (*AttributeContext_Peer) GetRegionCode Uses

func (x *AttributeContext_Peer) GetRegionCode() string

func (*AttributeContext_Peer) ProtoMessage Uses

func (*AttributeContext_Peer) ProtoMessage()

func (*AttributeContext_Peer) ProtoReflect Uses

func (x *AttributeContext_Peer) ProtoReflect() protoreflect.Message

func (*AttributeContext_Peer) Reset Uses

func (x *AttributeContext_Peer) Reset()

func (*AttributeContext_Peer) String Uses

func (x *AttributeContext_Peer) String() string

type AttributeContext_Request Uses

type AttributeContext_Request struct {

    // The unique ID for a request, which can be propagated to downstream
    // systems. The ID should have low probability of collision
    // within a single day for a specific service.
    Id  string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    // The HTTP request method, such as `GET`, `POST`.
    Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
    // The HTTP request headers. If multiple headers share the same key, they
    // must be merged according to the HTTP spec. All header keys must be
    // lowercased, because HTTP header keys are case-insensitive.
    Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // The HTTP URL path.
    Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
    // The HTTP request `Host` header value.
    Host string `protobuf:"bytes,5,opt,name=host,proto3" json:"host,omitempty"`
    // The HTTP URL scheme, such as `http` and `https`.
    Scheme string `protobuf:"bytes,6,opt,name=scheme,proto3" json:"scheme,omitempty"`
    // The HTTP URL query in the format of `name1=value1&name2=value2`, as it
    // appears in the first line of the HTTP request. No decoding is performed.
    Query string `protobuf:"bytes,7,opt,name=query,proto3" json:"query,omitempty"`
    // The timestamp when the `destination` service receives the first byte of
    // the request.
    Time *timestamp.Timestamp `protobuf:"bytes,9,opt,name=time,proto3" json:"time,omitempty"`
    // The HTTP request size in bytes. If unknown, it must be -1.
    Size int64 `protobuf:"varint,10,opt,name=size,proto3" json:"size,omitempty"`
    // The network protocol used with the request, such as "http/1.1",
    // "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
    // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
    // for details.
    Protocol string `protobuf:"bytes,11,opt,name=protocol,proto3" json:"protocol,omitempty"`
    // A special parameter for request reason. It is used by security systems
    // to associate auditing information with a request.
    Reason string `protobuf:"bytes,12,opt,name=reason,proto3" json:"reason,omitempty"`
    // The request authentication. May be absent for unauthenticated requests.
    // Derived from the HTTP request `Authorization` header or equivalent.
    Auth *AttributeContext_Auth `protobuf:"bytes,13,opt,name=auth,proto3" json:"auth,omitempty"`
    // contains filtered or unexported fields
}

This message defines attributes for an HTTP request. If the actual request is not an HTTP request, the runtime system should try to map the actual request to an equivalent HTTP request.

func (*AttributeContext_Request) Descriptor Uses

func (*AttributeContext_Request) Descriptor() ([]byte, []int)

Deprecated: Use AttributeContext_Request.ProtoReflect.Descriptor instead.

func (*AttributeContext_Request) GetAuth Uses

func (x *AttributeContext_Request) GetAuth() *AttributeContext_Auth

func (*AttributeContext_Request) GetHeaders Uses

func (x *AttributeContext_Request) GetHeaders() map[string]string

func (*AttributeContext_Request) GetHost Uses

func (x *AttributeContext_Request) GetHost() string

func (*AttributeContext_Request) GetId Uses

func (x *AttributeContext_Request) GetId() string

func (*AttributeContext_Request) GetMethod Uses

func (x *AttributeContext_Request) GetMethod() string

func (*AttributeContext_Request) GetPath Uses

func (x *AttributeContext_Request) GetPath() string

func (*AttributeContext_Request) GetProtocol Uses

func (x *AttributeContext_Request) GetProtocol() string

func (*AttributeContext_Request) GetQuery Uses

func (x *AttributeContext_Request) GetQuery() string

func (*AttributeContext_Request) GetReason Uses

func (x *AttributeContext_Request) GetReason() string

func (*AttributeContext_Request) GetScheme Uses

func (x *AttributeContext_Request) GetScheme() string

func (*AttributeContext_Request) GetSize Uses

func (x *AttributeContext_Request) GetSize() int64

func (*AttributeContext_Request) GetTime Uses

func (x *AttributeContext_Request) GetTime() *timestamp.Timestamp

func (*AttributeContext_Request) ProtoMessage Uses

func (*AttributeContext_Request) ProtoMessage()

func (*AttributeContext_Request) ProtoReflect Uses

func (x *AttributeContext_Request) ProtoReflect() protoreflect.Message

func (*AttributeContext_Request) Reset Uses

func (x *AttributeContext_Request) Reset()

func (*AttributeContext_Request) String Uses

func (x *AttributeContext_Request) String() string

type AttributeContext_Resource Uses

type AttributeContext_Resource struct {

    // The name of the service that this resource belongs to, such as
    // `pubsub.googleapis.com`. The service may be different from the DNS
    // hostname that actually serves the request.
    Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
    // The stable identifier (name) of a resource on the `service`. A resource
    // can be logically identified as "//{resource.service}/{resource.name}".
    // The differences between a resource name and a URI are:
    //
    // *   Resource name is a logical identifier, independent of network
    //     protocol and API version. For example,
    //     `//pubsub.googleapis.com/projects/123/topics/news-feed`.
    // *   URI often includes protocol and version information, so it can
    //     be used directly by applications. For example,
    //     `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`.
    //
    // See https://cloud.google.com/apis/design/resource_names for details.
    Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
    // The type of the resource. The syntax is platform-specific because
    // different platforms define their resources differently.
    //
    // For Google APIs, the type format must be "{service}/{kind}".
    Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
    // The labels or tags on the resource, such as AWS resource tags and
    // Kubernetes resource labels.
    Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // contains filtered or unexported fields
}

This message defines core attributes for a resource. A resource is an addressable (named) entity provided by the destination service. For example, a file stored on a network storage service.

func (*AttributeContext_Resource) Descriptor Uses

func (*AttributeContext_Resource) Descriptor() ([]byte, []int)

Deprecated: Use AttributeContext_Resource.ProtoReflect.Descriptor instead.

func (*AttributeContext_Resource) GetLabels Uses

func (x *AttributeContext_Resource) GetLabels() map[string]string

func (*AttributeContext_Resource) GetName Uses

func (x *AttributeContext_Resource) GetName() string

func (*AttributeContext_Resource) GetService Uses

func (x *AttributeContext_Resource) GetService() string

func (*AttributeContext_Resource) GetType Uses

func (x *AttributeContext_Resource) GetType() string

func (*AttributeContext_Resource) ProtoMessage Uses

func (*AttributeContext_Resource) ProtoMessage()

func (*AttributeContext_Resource) ProtoReflect Uses

func (x *AttributeContext_Resource) ProtoReflect() protoreflect.Message

func (*AttributeContext_Resource) Reset Uses

func (x *AttributeContext_Resource) Reset()

func (*AttributeContext_Resource) String Uses

func (x *AttributeContext_Resource) String() string

type AttributeContext_Response Uses

type AttributeContext_Response struct {

    // The HTTP response status code, such as `200` and `404`.
    Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
    // The HTTP response size in bytes. If unknown, it must be -1.
    Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
    // The HTTP response headers. If multiple headers share the same key, they
    // must be merged according to HTTP spec. All header keys must be
    // lowercased, because HTTP header keys are case-insensitive.
    Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // The timestamp when the `destination` service generates the first byte of
    // the response.
    Time *timestamp.Timestamp `protobuf:"bytes,4,opt,name=time,proto3" json:"time,omitempty"`
    // contains filtered or unexported fields
}

This message defines attributes for a typical network response. It generally models semantics of an HTTP response.

func (*AttributeContext_Response) Descriptor Uses

func (*AttributeContext_Response) Descriptor() ([]byte, []int)

Deprecated: Use AttributeContext_Response.ProtoReflect.Descriptor instead.

func (*AttributeContext_Response) GetCode Uses

func (x *AttributeContext_Response) GetCode() int64

func (*AttributeContext_Response) GetHeaders Uses

func (x *AttributeContext_Response) GetHeaders() map[string]string

func (*AttributeContext_Response) GetSize Uses

func (x *AttributeContext_Response) GetSize() int64

func (*AttributeContext_Response) GetTime Uses

func (x *AttributeContext_Response) GetTime() *timestamp.Timestamp

func (*AttributeContext_Response) ProtoMessage Uses

func (*AttributeContext_Response) ProtoMessage()

func (*AttributeContext_Response) ProtoReflect Uses

func (x *AttributeContext_Response) ProtoReflect() protoreflect.Message

func (*AttributeContext_Response) Reset Uses

func (x *AttributeContext_Response) Reset()

func (*AttributeContext_Response) String Uses

func (x *AttributeContext_Response) String() string

Package attribute_context imports 8 packages (graph) and is imported by 3 packages. Updated 2020-07-17. Refresh now. Tools for package owners.