lib

package module
v0.0.0-...-2521f96 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReferencedIdsParam = "referencedIds"
)

Variables

This section is empty.

Functions

func AddToManyToManyPlus

func AddToManyToManyPlus(env *beldilib.Env, newId string, setup referenceNavigationListSetupPlus) error

func AreInstancesAlreadyCreatedPlus

func AreInstancesAlreadyCreatedPlus(env *beldilib.Env, param LoadBatchParam) error

func DeleteBatchFromManyToManyPlus

func DeleteBatchFromManyToManyPlus(env *beldilib.Env, toDelete []string, setup referenceNavigationListSetupPlus) error

func DeletePlus

func DeletePlus[T Nobject](env *beldilib.Env, id string) error

func DeleteWithTypeNameAsArgPlus

func DeleteWithTypeNameAsArgPlus(id, typeName string) error

func ExportPlus

func ExportPlus[T Nobject](env *beldilib.Env, objToInsert Nobject) (*T, error)

func GetFieldOfTypePlus

func GetFieldOfTypePlus[N any](env *beldilib.Env, param GetStateParam, field *N) error

func GetFieldPlus

func GetFieldPlus(env *beldilib.Env, param GetStateParam) (interface{}, error)

func GetIdsPlus

func GetIdsPlus(env *beldilib.Env, setup referenceNavigationListSetupPlus) ([]string, error)

func GetStubPlus

func GetStubPlus[T Nobject](env *beldilib.Env, id string, object *T) error

func GetStubWithTypeNameAsArgPlus

func GetStubWithTypeNameAsArgPlus(env *beldilib.Env, id, typeName string) (map[string]interface{}, error)

func GetStubsInBatchPlus

func GetStubsInBatchPlus[T Nobject](env *beldilib.Env, ids []string) ([]*T, error)

func GetStubsInBatchWithTypeNameAsArgPlus

func GetStubsInBatchWithTypeNameAsArgPlus(env *beldilib.Env, param GetBatchParam) ([]interface{}, error)

this needs to be in transaction

func InsertPlus

func InsertPlus(env *beldilib.Env, objToInsert Nobject) (interface{}, error)

func IsInstanceAlreadyCreatedPlus

func IsInstanceAlreadyCreatedPlus(env *beldilib.Env, param IsInstanceAlreadyCreatedParam) (bool, error)

func LoadBatchPlus

func LoadBatchPlus[T Nobject](env *beldilib.Env, ids []string) ([]*T, error)

func LoadPlus

func LoadPlus[T Nobject](env *beldilib.Env, id string) (*T, error)

func SetFieldPlus

func SetFieldPlus(env *beldilib.Env, param SetFieldParam) error

func UpsertPlus

func UpsertPlus(env *beldilib.Env, objToInsert Nobject, id string) (interface{}, error)

Types

type AddToManyToManyParam

type AddToManyToManyParam struct {
	RefNavListParam ReferenceNavigationListParam
	NewId           string
}

func (AddToManyToManyParam) Verify

func (a AddToManyToManyParam) Verify() error

type CustomId

type CustomId interface {
	GetId() string
}

type DeleteFromManyToManyParam

type DeleteFromManyToManyParam struct {
	RefNavListParam ReferenceNavigationListParam
	IdsToDelete     []string
}

func (DeleteFromManyToManyParam) Verify

func (a DeleteFromManyToManyParam) Verify() error

type GetBatchParam

type GetBatchParam struct {
	Ids      []string
	TypeName string
}

func (GetBatchParam) Validate

func (q GetBatchParam) Validate() error

type GetStateParam

type GetStateParam struct {
	Id        string
	FieldName string
	TypeName  string
	GetStub   bool
}

func (GetStateParam) Validate

func (s GetStateParam) Validate() error

type HandlerParameters

type HandlerParameters struct {
	// Indicates the ID of associated object instance
	Id string
	// Indicates the TypeName of associated object instance
	TypeName string
	// Parameter of the orginal function
	// from which the handler is generated
	Parameter interface{}
}

type IsInstanceAlreadyCreatedParam

type IsInstanceAlreadyCreatedParam struct {
	Id       string
	TypeName string
}

type LoadBatchParam

type LoadBatchParam struct {
	TypeName string
	Ids      []string
}

func (LoadBatchParam) Verify

func (l LoadBatchParam) Verify() error

type ManyToMany

type ManyToMany struct {
	Id            string   `json:"id"`
	ReferencedIds []string `json:"referencedIds"`
}

type Nobject

type Nobject interface {
	GetTypeName() string
}

type NotFoundError

type NotFoundError struct {
	Ids      []string
	TypeName string
}

func (NotFoundError) Error

func (m NotFoundError) Error() string

type QueryByIndexParam

type QueryByIndexParam struct {
	TableName           string
	IndexName           string
	KeyAttributeName    string
	KeyAttributeValue   string
	OutputAttributeName string
}

func (QueryByIndexParam) Validate

func (q QueryByIndexParam) Validate() error

type QueryByPartitionKeyParam

type QueryByPartitionKeyParam struct {
	TableName               string
	PartitionAttributeName  string
	PatritionAttributeValue string
	OutputAttributeName     string
}

func (QueryByPartitionKeyParam) Validate

func (q QueryByPartitionKeyParam) Validate() error

type Reference

type Reference[T Nobject] string

func NewReference

func NewReference[T Nobject](id string) *Reference[T]

func (Reference[T]) Get

func (r Reference[T]) Get(env *beldilib.Env) (*T, error)

func (Reference[T]) GetStub

func (r Reference[T]) GetStub(env *beldilib.Env) (*T, error)

func (Reference[T]) Id

func (r Reference[T]) Id() string

type ReferenceList

type ReferenceList[T Nobject] []string

func NewReferenceList

func NewReferenceList[T Nobject](ids []string) ReferenceList[T]

func (ReferenceList[T]) Get

func (r ReferenceList[T]) Get(env *beldilib.Env) ([]*T, error)

func (ReferenceList[T]) GetAt

func (r ReferenceList[T]) GetAt(env *beldilib.Env, index int) (*T, error)

func (ReferenceList[T]) GetIds

func (r ReferenceList[T]) GetIds() []string

func (ReferenceList[T]) GetStubAt

func (r ReferenceList[T]) GetStubAt(env *beldilib.Env, index int) (*T, error)

func (ReferenceList[T]) GetStubs

func (r ReferenceList[T]) GetStubs(env *beldilib.Env) ([]*T, error)

type ReferenceNavigationListHandlersPlus

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

func (ReferenceNavigationListHandlersPlus) AddToManyToManyPlus

func (r ReferenceNavigationListHandlersPlus) AddToManyToManyPlus(env *beldilib.Env, newId string) error

func (ReferenceNavigationListHandlersPlus) DeleteBatchFromManyToManyPlus

func (r ReferenceNavigationListHandlersPlus) DeleteBatchFromManyToManyPlus(env *beldilib.Env, toDelete []string) error

func (ReferenceNavigationListHandlersPlus) GetIdsPlus

func (ReferenceNavigationListHandlersPlus) GetPlus

func (ReferenceNavigationListHandlersPlus) GetStubsPlus

func (r ReferenceNavigationListHandlersPlus) GetStubsPlus(env *beldilib.Env) ([]interface{}, error)

type ReferenceNavigationListParam

type ReferenceNavigationListParam struct {
	OwnerId            string
	OwnerTypeName      string
	OtherTypeName      string
	ReferringFieldName string
	IsManyToMany       bool
}

func (ReferenceNavigationListParam) Verify

type ReferenceNavigationListPlus

type ReferenceNavigationListPlus[T Nobject] struct {
	// contains filtered or unexported fields
}

func (ReferenceNavigationListPlus[T]) AddToManyToManyPlus

func (r ReferenceNavigationListPlus[T]) AddToManyToManyPlus(env *beldilib.Env, newId string, setup referenceNavigationListSetupPlus) error

func (ReferenceNavigationListPlus[T]) DeleteBatchFromManyToManyPlus

func (r ReferenceNavigationListPlus[T]) DeleteBatchFromManyToManyPlus(env *beldilib.Env, toDelete []string) error

func (ReferenceNavigationListPlus[T]) GetIdsPlus

func (r ReferenceNavigationListPlus[T]) GetIdsPlus(env *beldilib.Env) ([]string, error)

func (ReferenceNavigationListPlus[T]) GetPlus

func (r ReferenceNavigationListPlus[T]) GetPlus(env *beldilib.Env) ([]*T, error)

func (ReferenceNavigationListPlus[T]) GetStubsPlus

func (r ReferenceNavigationListPlus[T]) GetStubsPlus(env *beldilib.Env) ([]*T, error)

type SetFieldParam

type SetFieldParam struct {
	Id        string
	TypeName  string
	FieldName string
	Value     interface{}
}

func (SetFieldParam) Validate

func (s SetFieldParam) Validate() error

Jump to

Keyboard shortcuts

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