util

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindResourceField added in v0.4.1

func HasMutableResourceReferences

func HasMutableResourceReferences(message protoreflect.MessageDescriptor) bool

func HasParent

func HasParent(r *annotations.ResourceDescriptor) bool

func HasRequiredFields

func HasRequiredFields(message protoreflect.MessageDescriptor) bool

func HasUpdateMask added in v0.1.5

func HasUpdateMask(method protoreflect.MethodDescriptor) bool

func IsAlternativeBatch added in v0.4.0

func IsAlternativeBatch(method protoreflect.MethodDescriptor) bool

func IsAlternativeBatchDelete added in v0.4.0

func IsAlternativeBatchDelete(method protoreflect.MethodDescriptor) bool

func IsAlternativeBatchGet

func IsAlternativeBatchGet(method protoreflect.MethodDescriptor) bool

func PathChainGet

func PathChainGet(p protopath.Path) string

func RangeRequiredFields

func RangeRequiredFields(
	message protoreflect.MessageDescriptor,
	f func(protopath.Path, protoreflect.FieldDescriptor),
)

func ReturnsLRO

func ReturnsLRO(method protoreflect.MethodDescriptor) bool

func StandardMethod

func StandardMethod(
	service *protogen.Service,
	r *annotations.ResourceDescriptor,
	methodType aipreflect.MethodType,
) (*protogen.Method, bool)

func WildcardResourceName added in v0.8.0

func WildcardResourceName(r *annotations.ResourceDescriptor) string

Types

type MethodBatchGet

type MethodBatchGet struct {
	Resource *annotations.ResourceDescriptor
	Method   *protogen.Method

	Parent string
	Names  []string
}

func (MethodBatchGet) Generate

func (m MethodBatchGet) Generate(f *protogen.GeneratedFile, response, err, assign string)

type MethodCreate

type MethodCreate struct {
	Resource *annotations.ResourceDescriptor
	Method   *protogen.Method

	Parent         string
	Message        string
	UserSettableID string
}

func (MethodCreate) Generate

func (m MethodCreate) Generate(f *protogen.GeneratedFile, response, err, assign string)

type MethodDelete

type MethodDelete struct {
	Resource *annotations.ResourceDescriptor
	Method   *protogen.Method

	Name string
}

func (MethodDelete) Generate

func (m MethodDelete) Generate(f *protogen.GeneratedFile, response, err, assign string)

type MethodGet

type MethodGet struct {
	Resource *annotations.ResourceDescriptor
	Method   *protogen.Method

	Name string
}

func (MethodGet) Generate

func (m MethodGet) Generate(f *protogen.GeneratedFile, response, err, assign string)

type MethodList

type MethodList struct {
	Resource *annotations.ResourceDescriptor
	Method   *protogen.Method

	Parent    string
	PageSize  string
	PageToken string
}

func (MethodList) Generate

func (m MethodList) Generate(f *protogen.GeneratedFile, response, err, assign string)

type MethodSearch

type MethodSearch struct {
	Resource *annotations.ResourceDescriptor
	Method   *protogen.Method

	Parent    string
	PageSize  string
	PageToken string
}

func (MethodSearch) Generate

func (m MethodSearch) Generate(f *protogen.GeneratedFile, response, err, assign string)

type MethodUpdate

type MethodUpdate struct {
	Resource *annotations.ResourceDescriptor
	Method   *protogen.Method

	// set either Parent + Name, or Msg
	Name       string
	Parent     string
	Msg        string
	UpdateMask []string
}

func (MethodUpdate) Generate

func (m MethodUpdate) Generate(f *protogen.GeneratedFile, response, err, assign string)

Jump to

Keyboard shortcuts

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