internal

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package internal contains neuron internal variables and interfaces, used by multiple packages.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ControllerStoreKey is the store key used to store the controller.
	ControllerStoreKey = ControllerStoreKeyStruct{}

	//  TxStateStoreKey is the store key used to store the scope's transaction.
	TxStateStoreKey = TxStateStoreStruct{}

	// ReducedPrimariesStoreKey is the store key used to store the reduced
	// scope primary values.
	ReducedPrimariesStoreKey = ReducedPrimariesStoreStruct{}

	// PrimariesAlreadyChecked is the store key flag value used to notify that
	// the primaries for given process chain were already checked.
	PrimariesAlreadyChecked = primariesChecked{}

	// PreviousProcessStoreKey is the store key used to indicate what was the
	// previous query process.
	PreviousProcessStoreKey = PreviousProcess{}

	// AutoBeginStoreKey is the key that defines if query were started
	// with begin_transaction process.
	AutoBeginStoreKey = autoBegin{}

	// JustCreated is the store key that defines that the root scope's process is just after the creation process.
	JustCreated = created{}
)

Store keys

View Source
var Processes = make(map[string]struct{})

Processes is a mapping of the already registered query processes name.

Functions

This section is empty.

Types

type AttributeGetter added in v0.2.1

type AttributeGetter interface {
	GetAttribute(name string) interface{}
}

AttributeGetter is the interface used to get the attribute value from the model instance.

type AttributeModel added in v0.2.1

type AttributeModel interface {
	AttributeGetter
	AttributeSetter
}

AttributeModel is the interface used for models that are allowed to get and set their attribute fields.

type AttributeSetter added in v0.2.1

type AttributeSetter interface {
	SetAttribute(name string, value interface{}) error
}

AttributeSetter sets the attribute value for given model instance.

type ControllerStoreKeyStruct added in v0.2.1

type ControllerStoreKeyStruct struct{}

ControllerStoreKeyStruct is the common struct used as a controller's key in the Stores.

type ForeignKeyGetter added in v0.2.1

type ForeignKeyGetter interface {
	GetForeignKey(name string) interface{}
}

ForeignKeyGetter is the interface used to get the value of the foreign key field with given name from the model instance.

type ForeignKeyModel added in v0.2.1

type ForeignKeyModel interface {
	ForeignKeyGetter
	ForeignKeySetter
}

ForeignKeyModel is the interface used for getting and setting the value of foreign key fields for given model.

type ForeignKeySetter added in v0.2.1

type ForeignKeySetter interface {
	SetForeignKey(name string, value interface{}) error
}

ForeignKeySetter is the interface used to set the value of the foreign key field for the provided name for the model instance

type IDGetter added in v0.2.1

type IDGetter interface {
	GetID() interface{}
}

IDGetter is the interface used to get the ID from the model instance.

type IDModel added in v0.2.1

type IDModel interface {
	IDGetter
	IDSetter
}

IDModel is the interface that is allowed to get and set the ID field.

type IDSetter added in v0.2.1

type IDSetter interface {
	SetID(id interface{}) error
}

IDSetter is the interface used to set the ID for the model instance.

type PreviousProcess added in v0.2.1

type PreviousProcess struct{}

PreviousProcess is a struct used as the Store key for getting the previous process.

type ReducedPrimariesStoreStruct added in v0.2.1

type ReducedPrimariesStoreStruct struct{}

ReducedPrimariesStoreStruct is the Store key that keeps the primary values in the patch scope.

type TxStateStoreStruct added in v0.2.1

type TxStateStoreStruct struct{}

TxStateStoreStruct is the common struct used as a transaction state key in the scope's Store.

Directories

Path Synopsis
Package controller defines root neuron structure - controller.
Package controller defines root neuron structure - controller.
Package models encapsulates models structure as well as their mapping process.
Package models encapsulates models structure as well as their mapping process.
query
filters
Package filters contains query filters and operator structure definitions.
Package filters contains query filters and operator structure definitions.
paginations
Package paginations contains the query pagianation structure definitions.
Package paginations contains the query pagianation structure definitions.
scope
Package scope defines and encapsulates query scope structure with the methods that should be used internally within the neuron-core module.
Package scope defines and encapsulates query scope structure with the methods that should be used internally within the neuron-core module.
sorts
Package sorts contains query sort order structures.
Package sorts contains query sort order structures.
Package safemap defines concurrently safe hash map.
Package safemap defines concurrently safe hash map.

Jump to

Keyboard shortcuts

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