checkfield

package
v0.4.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCreateOutputOnlyFields

func CheckCreateOutputOnlyFields(msg interface{}, outputOnlyFields []string) error

CheckCreateOutputOnlyFields implements follows https://google.aip.dev/203#output-only The msg parameter is a Protobuf message instance The outputOnlyFields is a slice of field path with snake_case name

func CheckRequiredFields

func CheckRequiredFields(msg interface{}, requiredFields []string) error

CheckRequiredFields implements follows https://google.aip.dev/203#required The msg parameter is a Protobuf message instance The requiredFields is a slice of field path with snake_case name

func CheckResourceID

func CheckResourceID(id string) error

CheckResourceID implements follows https://google.aip.dev/122#resource-id-segments

func CheckUpdateImmutableFields

func CheckUpdateImmutableFields(msgReq interface{}, msgUpdate interface{}, immutableFields []string) error

CheckUpdateImmutableFields implements follows https://google.aip.dev/203#immutable The msgReq parameter is a Protobuf message instance requested to update msgUpdate The outputOnlyFields is a slice of field path with snake_case name

func CheckUpdateOutputOnlyFields

func CheckUpdateOutputOnlyFields(mask *fieldmaskpb.FieldMask, outputOnlyFields []string) (*fieldmaskpb.FieldMask, error)

CheckUpdateOutputOnlyFields removes outputOnlyFields from the input field mask outputOnlyFields are field paths in `snake_case` like paths in the input field mask.

Types

This section is empty.

Jump to

Keyboard shortcuts

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