gorm

package
v0.7.21 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListValueFromListValueGORM

func ListValueFromListValueGORM(
	dest *structpb.ListValue,
	src *ListValueGORM,
	decorator func(dest *structpb.ListValue, src *ListValueGORM) error,
) (out *structpb.ListValue, err error)

ListValueFromListValueGORM converts a ListValueGORM back to structpb.ListValue. The optional decorator function allows custom field transformations.

func StructFromStructGORM

func StructFromStructGORM(
	dest *structpb.Struct,
	src *StructGORM,
	decorator func(dest *structpb.Struct, src *StructGORM) error,
) (out *structpb.Struct, err error)

StructFromStructGORM converts a StructGORM back to structpb.Struct. The optional decorator function allows custom field transformations.

func UserFromUserGORM

func UserFromUserGORM(
	dest *v1.User,
	src *UserGORM,
	decorator func(dest *v1.User, src *UserGORM) error,
) (out *v1.User, err error)

UserFromUserGORM converts a UserGORM back to v1.User. The optional decorator function allows custom field transformations.

func ValueFromValueGORM

func ValueFromValueGORM(
	dest *structpb.Value,
	src *ValueGORM,
	decorator func(dest *structpb.Value, src *ValueGORM) error,
) (out *structpb.Value, err error)

ValueFromValueGORM converts a ValueGORM back to structpb.Value. The optional decorator function allows custom field transformations.

Types

type ListValueGORM

type ListValueGORM struct {
	Values []ValueGORM
}

ListValueGORM is the GORM model for google.protobuf.ListValue

func ListValueToListValueGORM

func ListValueToListValueGORM(
	src *structpb.ListValue,
	dest *ListValueGORM,
	decorator func(*structpb.ListValue, *ListValueGORM) error,
) (out *ListValueGORM, err error)

ListValueToListValueGORM converts a structpb.ListValue to ListValueGORM. The optional decorator function allows custom field transformations.

func (*ListValueGORM) Scan

func (m *ListValueGORM) Scan(value interface{}) error

Scan implements sql.Scanner for ListValueGORM

func (ListValueGORM) Value

func (m ListValueGORM) Value() (driver.Value, error)

Value implements driver.Valuer for ListValueGORM

type StructGORM

type StructGORM struct {
	Fields map[string]ValueGORM
}

StructGORM is the GORM model for google.protobuf.Struct

func StructToStructGORM

func StructToStructGORM(
	src *structpb.Struct,
	dest *StructGORM,
	decorator func(*structpb.Struct, *StructGORM) error,
) (out *StructGORM, err error)

StructToStructGORM converts a structpb.Struct to StructGORM. The optional decorator function allows custom field transformations.

func (*StructGORM) Scan

func (m *StructGORM) Scan(value interface{}) error

Scan implements sql.Scanner for StructGORM

func (StructGORM) Value

func (m StructGORM) Value() (driver.Value, error)

Value implements driver.Valuer for StructGORM

type UserGORM

type UserGORM struct {
	CreatedAt   time.Time
	UpdatedAt   time.Time
	Id          string `gorm:"primaryKey"`
	Name        string
	Description string
	Tags        []string `gorm:"serializer:json"`
	ImageUrl    string
	Email       string
	Nickname    string
	Extras      StructGORM `gorm:"serializer:json"`
}

UserGORM is the GORM model for goapplib.v1.User

func UserToUserGORM

func UserToUserGORM(
	src *v1.User,
	dest *UserGORM,
	decorator func(*v1.User, *UserGORM) error,
) (out *UserGORM, err error)

UserToUserGORM converts a v1.User to UserGORM. The optional decorator function allows custom field transformations.

func (*UserGORM) TableName

func (*UserGORM) TableName() string

TableName returns the table name for UserGORM

type ValueGORM

type ValueGORM struct {
	NullValue   structpb.NullValue
	NumberValue float64
	StringValue string
	BoolValue   bool
	StructValue StructGORM
	ListValue   ListValueGORM
}

ValueGORM is the GORM model for google.protobuf.Value

func ValueToValueGORM

func ValueToValueGORM(
	src *structpb.Value,
	dest *ValueGORM,
	decorator func(*structpb.Value, *ValueGORM) error,
) (out *ValueGORM, err error)

ValueToValueGORM converts a structpb.Value to ValueGORM. The optional decorator function allows custom field transformations.

func (*ValueGORM) Scan

func (m *ValueGORM) Scan(value interface{}) error

Scan implements sql.Scanner for ValueGORM

func (ValueGORM) Value

func (m ValueGORM) Value() (driver.Value, error)

Value implements driver.Valuer for ValueGORM

Directories

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

Jump to

Keyboard shortcuts

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