encrepo

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0, MIT Imports: 22 Imported by: 2

README


Yolo - The Berty Project

Berty is a secure peer-to-peer messaging app that works with or without internet access, cellular data or trust in the network

Made by Berty Technologies discord github twitter go.dev reference GitHub release

TODO: short headline.

TODO: short intro for non-tech. what is this repo about.

TODO: optional clarification for techs, if the short intro is not enough to understand what is this repo about.

Install

TODO

Getting Started

TODO

Troubleshooting

(please use issues)

Development

TODO

Architecture

TODO

Testing

TODO

Contributing

Contribute to Berty

If you want to help out, please see CONTRIBUTING.md.

This repository falls under the Berty Code of Conduct.

You can contact us on the #dev-💻 channel on discord.

License

Dual-licensed under Apache 2.0 and MIT terms.

SPDX-License-Identifier: (Apache-2.0 OR MIT)

See the COPYRIGHT file for more details.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDatabaseNotFound = errors.New("database not found")
	ErrTableNotFound    = errors.New("table not found")
)

Functions

func Init

func Init(dbPath string, key []byte, conf *config.Config) error

func IsInitialized

func IsInitialized(dbPath string, key []byte) (bool, error)

func KeystoreFromDatastore

func KeystoreFromDatastore(ds datastore.Datastore, namespace string) keystore.Keystore

func NewNamespacedDatastore

func NewNamespacedDatastore(child ds.Datastore, prefix ds.Key) ds.Batching

func NewSQLCipherDatastore

func NewSQLCipherDatastore(driver, dbPath, table string, key []byte) (*sqlds.Datastore, error)

func NewSQLiteDatastore

func NewSQLiteDatastore(driver, url, table string) (*sqlds.Datastore, error)

func Open

func Open(dbPath string, key []byte) (repo.Repo, error)

func OpenSQLCipherDatastore

func OpenSQLCipherDatastore(driver, dbPath, table string, key []byte) (*sqlds.Datastore, error)

Types

type Queries

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

Queries are the sqlite queries for a given table.

func NewQueries

func NewQueries(tbl string) Queries

NewQueries creates a new sqlite set of queries for the passed table

func (Queries) Delete

func (q Queries) Delete() string

Delete returns the sqlite query for deleting a row.

func (Queries) Exists

func (q Queries) Exists() string

Exists returns the sqlite query for determining if a row exists.

func (Queries) Get

func (q Queries) Get() string

Get returns the sqlite query for getting a row.

func (Queries) GetSize

func (q Queries) GetSize() string

GetSize returns the sqlite query for determining the size of a value.

func (Queries) Limit

func (q Queries) Limit() string

Limit returns the sqlite query fragment for limiting results.

func (Queries) Offset

func (q Queries) Offset() string

Offset returns the sqlite query fragment for returning rows from a given offset.

func (Queries) Prefix

func (q Queries) Prefix() string

Prefix returns the sqlite query fragment for getting a rows with a key prefix.

func (Queries) Put

func (q Queries) Put() string

Put returns the sqlite query for putting a row.

func (Queries) Query

func (q Queries) Query() string

Query returns the sqlite query for getting multiple rows.

Jump to

Keyboard shortcuts

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