datastore

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-dal-datastore. DO NOT EDIT.

Code generated by protoc-gen-dal-datastore. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListValueFromListValueDatastore

func ListValueFromListValueDatastore(
	dest *structpb.ListValue,
	src *ListValueDatastore,
	decorator func(*structpb.ListValue, *ListValueDatastore) error,
) (out *structpb.ListValue, err error)

ListValueFromListValueDatastore converts a ListValueDatastore back to ListValue.

The optional decorator function allows custom field transformations after conversion.

Parameters:

  • dest: Destination ListValue message (if nil, a new one is created)
  • src: Source ListValueDatastore entity to convert from
  • decorator: Optional function for custom transformations

Returns:

  • Converted ListValue message
  • Error if conversion fails

func StructFromStructDatastore

func StructFromStructDatastore(
	dest *structpb.Struct,
	src *StructDatastore,
	decorator func(*structpb.Struct, *StructDatastore) error,
) (out *structpb.Struct, err error)

StructFromStructDatastore converts a StructDatastore back to Struct.

The optional decorator function allows custom field transformations after conversion.

Parameters:

  • dest: Destination Struct message (if nil, a new one is created)
  • src: Source StructDatastore entity to convert from
  • decorator: Optional function for custom transformations

Returns:

  • Converted Struct message
  • Error if conversion fails

func UserFromUserDatastore

func UserFromUserDatastore(
	dest *v1.User,
	src *UserDatastore,
	decorator func(*v1.User, *UserDatastore) error,
) (out *v1.User, err error)

UserFromUserDatastore converts a UserDatastore back to User.

The optional decorator function allows custom field transformations after conversion.

Parameters:

  • dest: Destination User message (if nil, a new one is created)
  • src: Source UserDatastore entity to convert from
  • decorator: Optional function for custom transformations

Returns:

  • Converted User message
  • Error if conversion fails

func ValueFromValueDatastore

func ValueFromValueDatastore(
	dest *structpb.Value,
	src *ValueDatastore,
	decorator func(*structpb.Value, *ValueDatastore) error,
) (out *structpb.Value, err error)

ValueFromValueDatastore converts a ValueDatastore back to Value.

The optional decorator function allows custom field transformations after conversion.

Parameters:

  • dest: Destination Value message (if nil, a new one is created)
  • src: Source ValueDatastore entity to convert from
  • decorator: Optional function for custom transformations

Returns:

  • Converted Value message
  • Error if conversion fails

Types

type ListValueDatastore

type ListValueDatastore struct {
	Key *datastore.Key `datastore:"-"`

	Values []ValueDatastore `datastore:"values"`
}

ListValueDatastore is the Datastore entity for the source message.

func ListValueToListValueDatastore

func ListValueToListValueDatastore(
	src *structpb.ListValue,
	dest *ListValueDatastore,
	decorator func(*structpb.ListValue, *ListValueDatastore) error,
) (out *ListValueDatastore, err error)

ListValueToListValueDatastore converts a ListValue to ListValueDatastore.

The optional decorator function allows custom field transformations after conversion.

Parameters:

  • src: Source ListValue message to convert from
  • dest: Destination ListValueDatastore entity (if nil, a new one is created)
  • decorator: Optional function for custom transformations

Returns:

  • Converted ListValueDatastore entity
  • Error if conversion fails

type StructDatastore

type StructDatastore struct {
	Key *datastore.Key `datastore:"-"`

	Fields map[string]ValueDatastore `datastore:"fields"`
}

StructDatastore is the Datastore entity for the source message.

func StructToStructDatastore

func StructToStructDatastore(
	src *structpb.Struct,
	dest *StructDatastore,
	decorator func(*structpb.Struct, *StructDatastore) error,
) (out *StructDatastore, err error)

StructToStructDatastore converts a Struct to StructDatastore.

The optional decorator function allows custom field transformations after conversion.

Parameters:

  • src: Source Struct message to convert from
  • dest: Destination StructDatastore entity (if nil, a new one is created)
  • decorator: Optional function for custom transformations

Returns:

  • Converted StructDatastore entity
  • Error if conversion fails

type UserDatastore

type UserDatastore struct {
	Key *datastore.Key `datastore:"-"`

	CreatedAt time.Time `datastore:"created_at"`

	UpdatedAt time.Time `datastore:"updated_at"`

	Id string `datastore:"-"`

	Name string `datastore:"name"`

	Description string `datastore:"description"`

	Tags []string `datastore:"tags,noindex"`

	ImageUrl string `datastore:"image_url"`

	Email string `datastore:"email"`

	Nickname string `datastore:"nickname"`

	Extras StructDatastore `datastore:"extras,noindex"`
}

UserDatastore is the Datastore entity for the source message.

func UserToUserDatastore

func UserToUserDatastore(
	src *v1.User,
	dest *UserDatastore,
	decorator func(*v1.User, *UserDatastore) error,
) (out *UserDatastore, err error)

UserToUserDatastore converts a User to UserDatastore.

The optional decorator function allows custom field transformations after conversion.

Parameters:

  • src: Source User message to convert from
  • dest: Destination UserDatastore entity (if nil, a new one is created)
  • decorator: Optional function for custom transformations

Returns:

  • Converted UserDatastore entity
  • Error if conversion fails

func (*UserDatastore) Kind

func (*UserDatastore) Kind() string

Kind returns the Datastore kind name for UserDatastore.

type ValueDatastore

type ValueDatastore struct {
	Key *datastore.Key `datastore:"-"`

	NullValue structpb.NullValue `datastore:"null_value"`

	NumberValue float64 `datastore:"number_value"`

	StringValue string `datastore:"string_value"`

	BoolValue bool `datastore:"bool_value"`

	StructValue StructDatastore `datastore:"struct_value"`

	ListValue ListValueDatastore `datastore:"list_value"`
}

ValueDatastore is the Datastore entity for the source message.

func ValueToValueDatastore

func ValueToValueDatastore(
	src *structpb.Value,
	dest *ValueDatastore,
	decorator func(*structpb.Value, *ValueDatastore) error,
) (out *ValueDatastore, err error)

ValueToValueDatastore converts a Value to ValueDatastore.

The optional decorator function allows custom field transformations after conversion.

Parameters:

  • src: Source Value message to convert from
  • dest: Destination ValueDatastore entity (if nil, a new one is created)
  • decorator: Optional function for custom transformations

Returns:

  • Converted ValueDatastore entity
  • Error if conversion fails

Directories

Path Synopsis
Code generated by protoc-gen-dal-datastore.
Code generated by protoc-gen-dal-datastore.

Jump to

Keyboard shortcuts

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