gechologobject

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValueForEmptyJson

func ValueForEmptyJson() json.RawMessage

Can be used to create valid emty json string

Types

type GechoLogObject

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

func AppendNew

Creats a new g + Adds non-overlapping fields from o

func Filter

func Filter(g GechoLogObject, fieldsToInclude []string) GechoLogObject

Creates a new object from g without fields in the slice of strings

func New

func New() GechoLogObject

func Replace

Creates a new g with replacing overlappning fields from o

func (*GechoLogObject) AssignField

func (o *GechoLogObject) AssignField(field string, v any) error

Assign key = field to value = json.Marshalled v

func (*GechoLogObject) AssignFieldRaw

func (o *GechoLogObject) AssignFieldRaw(field string, jrm json.RawMessage) error

assign key-value par for field->jrm

func (*GechoLogObject) DebugString

func (o *GechoLogObject) DebugString() string

Prints a convenient string

func (*GechoLogObject) FieldNames

func (g *GechoLogObject) FieldNames() []string

Returns a slice with the list of field names

func (*GechoLogObject) GetField

func (o *GechoLogObject) GetField(field string) (json.RawMessage, error)

Getter for field

func (*GechoLogObject) IsEmpty

func (o *GechoLogObject) IsEmpty() bool

func (*GechoLogObject) MarshalJSON

func (o *GechoLogObject) MarshalJSON() ([]byte, error)

func (*GechoLogObject) UnmarshalJSON

func (o *GechoLogObject) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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