data

package
v0.0.0-...-f65cdbb Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAO

type DAO[T proto.Message] struct {
	// contains filtered or unexported fields
}

func New

func New[T proto.Message](db *database.Database, tableName string, tenant string, m database.Marshaler[T]) *DAO[T]

func (*DAO[T]) Add

func (q *DAO[T]) Add(data T) error

func (*DAO[T]) All

func (q *DAO[T]) All() ([]T, error)

func (*DAO[T]) Delete

func (q *DAO[T]) Delete(id string) error

func (*DAO[T]) Get

func (q *DAO[T]) Get(id string) (*T, error)

func (*DAO[T]) Update

func (q *DAO[T]) Update(data T) error

type DAOS

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

func NewDAOS

func NewDAOS(db *database.Database) *DAOS

func (*DAOS) ForTenant

func (c *DAOS) ForTenant(tenant string, entity string, message proto.Message) (*DAO[proto.Message], error)

func (*DAOS) Generic

func (c *DAOS) Generic(entity string, message proto.Message) (*DAO[proto.Message], error)

type ProtoMessageMarshaller

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

func (*ProtoMessageMarshaller) Marshal

func (s *ProtoMessageMarshaller) Marshal(q proto.Message) (string, []byte, error)

func (*ProtoMessageMarshaller) Unmarshal

func (s *ProtoMessageMarshaller) Unmarshal(d []byte) (proto.Message, error)

Jump to

Keyboard shortcuts

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