dao

package
v0.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(db *bolt.DB, entity types.Entity) error

Add entity. Check before save. If already exists a object under id. throw error

func AddFunctionDockerImageID

func AddFunctionDockerImageID(db *bolt.DB, function *types.Function, dockerImageID string) error

AddFunctionDockerImageID set DockerImageID

func AddFunctionLog

func AddFunctionLog(db *bolt.DB, function *types.Function, log types.EntityLog, status string) error

AddFunctionLog add function log

func AddManagerComponentDockerContainerID

func AddManagerComponentDockerContainerID(db *bolt.DB, component *types.ManagerComponent, containerID string) error

AddManagerComponentDockerContainerID set ContainerID

func AddManagerComponentDockerImageID

func AddManagerComponentDockerImageID(db *bolt.DB, component *types.ManagerComponent, dockerImageID string) error

AddManagerComponentDockerImageID set DockerImageID

func AddManagerComponentLog

func AddManagerComponentLog(db *bolt.DB, component *types.ManagerComponent, log types.EntityLog) error

AddManagerComponentLog add log

func Delete

func Delete(db *bolt.DB, entity types.Entity) error

Delete entity

func GetAll

func GetAll(db *bolt.DB, entity types.Entity, fn func(k, v []byte) error) error

GetAll entity

func GetByID

func GetByID(db *bolt.DB, entity types.Entity, fn func(v []byte) error) error

GetByID get by ID

func Save

func Save(db *bolt.DB, entity types.Entity) error

Save entity If there is no any entity under id add new. Otherwise save new entity under previous entity

func Update

func Update(db *bolt.DB, entity types.Entity) error

Update entity Check before save. If unable to found a object under id. Throw object not found error

Types

This section is empty.

Jump to

Keyboard shortcuts

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