persistence

package module
v0.0.0-...-3a2a94e Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: Apache-2.0 Imports: 0 Imported by: 13

README

Shimmering Bee: Persistence

license standard-readme compliant Actions Status

Persistence library for Shimmering Bee suite.

Table of Contents

Background

Persistence is a simplistic library for storing key values about objects.

Install

Add an import and most IDEs will go get automatically, if it doesn't go build will fetch.

import "github.com/shimmeringbee/persistence"

Usage

This libraries API is unstable and should not yet be relied upon.

Maintainers

@pwood

Contributing

Feel free to dive in! Open an issue or submit PRs.

All Shimmering Bee projects follow the Contributor Covenant Code of Conduct.

License

Copyright 2019-2020 Shimmering Bee Contributors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Section

type Section interface {
	Section(key ...string) Section
	SectionKeys() []string
	SectionExists(key string) bool
	SectionDelete(key string) bool

	Keys() []string
	Exists(key string) bool
	Type(key string) ValueType

	Int(key string, defValue ...int64) (int64, bool)
	UInt(key string, defValue ...uint64) (uint64, bool)
	String(key string, defValue ...string) (string, bool)
	Bool(key string, defValue ...bool) (bool, bool)
	Float(key string, defValue ...float64) (float64, bool)
	Bytes(key string, defValue ...[]byte) ([]byte, bool)

	Set(key string, value interface{})

	Delete(key string) bool
}

type Syncer

type Syncer interface {
	Sync()
}

type ValueType

type ValueType uint8
const (
	Int         ValueType = 0
	UnsignedInt ValueType = 1
	String      ValueType = 2
	Bool        ValueType = 3
	Float       ValueType = 4
	Bytes       ValueType = 5
	None        ValueType = 255
)

Directories

Path Synopsis
impl

Jump to

Keyboard shortcuts

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