repository

package
v0.0.0-...-ae4d183 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeAcc

func DeserializeAcc(b []byte) *entities.Account

DeserializeAcc deselialize acc

func DeserializeString

func DeserializeString(b []byte) string

DeserializeString deselialize strings

func SerializeAcc

func SerializeAcc(acc *entities.Account) []byte

SerializeAcc entity

func SerializeInt64

func SerializeInt64(i int64) []byte

SerializeInt64 int64 to bytes

func SerializeString

func SerializeString(b string) []byte

SerializeString string to bytes

Types

type Memory

type Memory struct {
	DB   *badger.DB
	Path string
}

Memory db

func OpenMemory

func OpenMemory() *Memory

OpenMemory get or create a connection with the database

func (Memory) Accounts

func (bg Memory) Accounts() []*ent.Account

Accounts accounts of guard

func (Memory) UpdateAccount

func (bg Memory) UpdateAccount(acc *ent.Account) error

UpdateAccount update the account

Jump to

Keyboard shortcuts

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