layers

package
v0.0.0-...-b6d5a13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatasetRequest

type DatasetRequest struct {
	DatasetName string
	Since       string
	Limit       int64
}

type Entity

type Entity struct {
	ID         string                 `json:"id"`
	IsDeleted  bool                   `json:"deleted"`
	References map[string]interface{} `json:"refs"`
	Properties map[string]interface{} `json:"props"`
}

func NewEntity

func NewEntity() *Entity

NewEntity Create a new entity with global uuid and internal resource id

func (*Entity) StripProps

func (entity *Entity) StripProps() map[string]interface{}

type Layer

type Layer struct {
	Repo *Repository //exported because it needs to deferred from main
	// contains filtered or unexported fields
}

func NewLayer

func NewLayer(lc fx.Lifecycle, cmgr *conf.ConfigurationManager, env *conf.Env) *Layer

func (*Layer) ChangeSet

func (l *Layer) ChangeSet(request db.DatasetRequest, callBack func(*Entity)) error

func (*Layer) DoesDatasetExist

func (l *Layer) DoesDatasetExist(datasetName string) bool

func (*Layer) GetContext

func (l *Layer) GetContext(datasetName string) map[string]interface{}

func (*Layer) GetDatasetNames

func (l *Layer) GetDatasetNames() []string

func (*Layer) GetDatasetPostNames

func (l *Layer) GetDatasetPostNames() []string

func (*Layer) GetTableDefinition

func (l *Layer) GetTableDefinition(datasetName string) *conf.TableMapping

type PostLayer

type PostLayer struct {
	PostRepo *PostRepository //exported because it needs to deferred from main??
	// contains filtered or unexported fields
}

func NewPostLayer

func NewPostLayer(lc fx.Lifecycle, cmgr *conf.ConfigurationManager, logger *zap.SugaredLogger) *PostLayer

func (*PostLayer) GetTableDefinition

func (postLayer *PostLayer) GetTableDefinition(datasetName string) *conf.PostMapping

func (*PostLayer) PostEntities

func (postLayer *PostLayer) PostEntities(datasetName string, entities []*Entity) error

type PostRepository

type PostRepository struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

type Repository

type Repository struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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