Documentation ¶
Overview ¶
Copyright © 2018 Zhao Ming <mint.zhao.chiu@gmail.com>.
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.
Copyright © 2018 Zhao Ming <mint.zhao.chiu@gmail.com>.
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.
Copyright © 2018 Zhao Ming <mint.zhao.chiu@gmail.com>.
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.
Index ¶
- func New(dir string) (database.Database, error)
- type BadgerDB
- func (db *BadgerDB) Close() error
- func (db *BadgerDB) Delete(bucket, key string) error
- func (db *BadgerDB) Get(bucket, key string) ([]byte, error)
- func (db *BadgerDB) NewBatch() (database.Batch, error)
- func (db *BadgerDB) NewIterator(bucket, prefix string) (database.Iterator, error)
- func (db *BadgerDB) Open() error
- func (db *BadgerDB) Set(bucket, key string, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BadgerDB ¶
type BadgerDB struct {
// contains filtered or unexported fields
}
func (*BadgerDB) NewBatch ¶
NewBatch returns a Batch interface to handle multi key/value pairs writes.
func (*BadgerDB) NewIterator ¶
NewIterator iterate over a key prefix