protooptions

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 2 Imported by: 0

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

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 FindExtensionPayloads

func FindExtensionPayloads(b []byte, ext protowire.Number) [][]byte

func HasExtension

func HasExtension(b []byte, ext protowire.Number) bool

func LastExtensionPayload

func LastExtensionPayload(b []byte, ext protowire.Number) ([]byte, bool)

func MethodUnknown

func MethodUnknown(m *descriptorpb.MethodDescriptorProto) []byte

Types

type AuditRule

type AuditRule struct {
	Event string
	Risk  string
}

func ParseAudit

func ParseAudit(b []byte) AuditRule

type AuthzRule

type AuthzRule struct {
	Action   string
	Resource string
	Audience string
	Mode     int32
}

func ParseAuthz

func ParseAuthz(b []byte) AuthzRule

type CapabilityRule

type CapabilityRule struct {
	Name  string
	Group string
}

func ParseCapability

func ParseCapability(b []byte) CapabilityRule

Jump to

Keyboard shortcuts

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