structreader

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFieldMissing = errors.New("field is missing")
	ErrFieldEmpty   = errors.New("field is empty")
	ErrNilStruct    = errors.New("struct is nil")
)

Functions

This section is empty.

Types

type StructReader

type StructReader struct {
	// contains filtered or unexported fields
}

StructReader provides methods to safely extract values from structpb.Struct

func New

func New(s *structpb.Struct) (*StructReader, error)

New creates a new StructReader from a structpb.Struct

func (*StructReader) GetString

func (r *StructReader) GetString(key string) (string, error)

GetString safely extracts string values from struct

Jump to

Keyboard shortcuts

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