librepository

package
v0.0.0-...-437541a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateInterface

type AggregateInterface interface {
	Definition() *Definition
	SetRepository(*libdomain.RepositoryInterface)
}

Definition is used to declare the information of a model, so it can generate its code.

type DatasourceClient

type DatasourceClient interface {
	MigrateAggregate([]*libdomain.AggregateDefinition) error
	// InitDB(writeInfo *libdata.ClusterInfo, readInfo *libdata.ClusterInfo) (*libdata.Cluster, error)
	// CreateTenant(*libdata.Workflow, []*libdata.ModelDefinition, *libdata.Tenant) error
	// GetTenant(*libdata.Workflow, *libdata.Tenant) (*libdata.Tenant, error)
	GetImportRepository() string
	GenerateScanFunc(libdomain.TableInterface) string
	Get(*libdomain.EntityDefinition, *libapplication.Workflow, string) (interface{}, error)
	Select(libdomain.TableInterface, *libapplication.Workflow, []*Filter, []string, *basepb.OptionsListQuery) (interface{}, error)
	Insert(
		libdomain.TableInterface, *libapplication.Workflow, []interface{},
		func([]interface{}) ([]string, map[string]interface{}),
		[]string,
	) (interface{}, error)
	Update(
		libdomain.TableInterface, *libapplication.Workflow, []*Filter, interface{}, *fieldmask.FieldMask,
		func(interface{}, *fieldmask.FieldMask) ([]string, map[string]interface{}), []string,
	) (interface{}, error)
	Delete(libdomain.TableInterface, *libapplication.Workflow, []*Filter) error
	BeginTransaction(*libapplication.Workflow, bool) error
	RollbackTransaction(*libapplication.Workflow) error
	CommitTransaction(*libapplication.Workflow) error
}

Driver is an interface for the drivers providing crud operations.

type Definition

type Definition struct {
	Aggregate        libdomain.AggregateInterface
	DatasourceClient DatasourceClient
	CacheClient      libapplication.CacheClient
	GenDomain        string
}

Definition is used to declare the information of a model, so it can generate its code.

type Definitions

type Definitions struct {
	Prefix        string
	GitRepository string
	// contains filtered or unexported fields
}

Definitions contains all the grpc definitions in the service.

func (*Definitions) GetByID

func (ds *Definitions) GetByID(id string) *Definition

GetByID return the specified definition by its ID.

func (*Definitions) MigrateAggregates

func (ds *Definitions) MigrateAggregates() error

GetByID return the specified definition by its ID.

func (*Definitions) Register

func (ds *Definitions) Register(d *Definition)

Register is used to register a new definition into the service.

func (*Definitions) Slice

func (ds *Definitions) Slice() []*Definition

Slice return the definitions as a slice.

type Filter

type Filter struct {
	Field    string
	Operator interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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