Documentation
¶
Overview ¶
Package protooptions contains low-level parsers for Aisphere protobuf custom options.
The cmd generators intentionally parse unknown option payloads by extension number so they do not depend on already-generated Go code for the options protos during bootstrapping.
Index ¶
- Constants
- func FindExtensionPayloads(b []byte, ext protowire.Number) [][]byte
- func HasExtension(b []byte, ext protowire.Number) bool
- func LastExtensionPayload(b []byte, ext protowire.Number) ([]byte, bool)
- func MethodUnknown(m *descriptorpb.MethodDescriptorProto) []byte
- type AuditRule
- type AuthzRule
- type CapabilityRule
Constants ¶
View Source
const ( // google.api.http = 72295728, see google/api/annotations.proto. ExtGoogleHTTP protowire.Number = 72295728 // aisphere.options.v1 method extensions, see api/aisphere/options/v1/authz.proto. ExtAuthz protowire.Number = 51001 ExtAudit protowire.Number = 51002 ExtCapability protowire.Number = 51003 )
Variables ¶
This section is empty.
Functions ¶
func LastExtensionPayload ¶
func MethodUnknown ¶
func MethodUnknown(m *descriptorpb.MethodDescriptorProto) []byte
Types ¶
type AuditRule ¶
func ParseAudit ¶
type AuthzRule ¶
func ParseAuthz ¶
type CapabilityRule ¶
func ParseCapability ¶
func ParseCapability(b []byte) CapabilityRule
Click to show internal directories.
Click to hide internal directories.