adacoredb

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AdaCoreDBKeyPrefix = "h:"

AdaCoreDBKeyPrefix - This is the prefix of AdaCoreDBKey

View Source
const AdaCoreDBName = "adacoredb"

AdaCoreDBName - adacore database name

Variables

This section is empty.

Functions

This section is empty.

Types

type AdaCoreDB

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

AdaCoreDB -

func NewAdaCoreDB

func NewAdaCoreDB(dbpath string, httpAddr string, engine string) (*AdaCoreDB, error)

NewAdaCoreDB - new AdaCoreDB

func (*AdaCoreDB) AddResource

func (db *AdaCoreDB) AddResource(ctx context.Context, hashname string, lst []*adacorepb.ResourceInfo) (int, error)

AddResource - add a resource

func (*AdaCoreDB) DelResource

func (db *AdaCoreDB) DelResource(ctx context.Context, hashname string) error

DelResource - delete a resource

func (*AdaCoreDB) GetResource

func (db *AdaCoreDB) GetResource(ctx context.Context, hashname string) (*adacorepb.ResourceInfo, error)

GetResource - get a resource

func (*AdaCoreDB) RecountAllCitedTimes

func (db *AdaCoreDB) RecountAllCitedTimes(ctx context.Context, hashname string) int

RecountAllCitedTimes - recount all cited times

func (*AdaCoreDB) ResetAllCitedTimes

func (db *AdaCoreDB) ResetAllCitedTimes(ctx context.Context) error

ResetAllCitedTimes - reset all cited times

func (*AdaCoreDB) SetResource

func (db *AdaCoreDB) SetResource(ctx context.Context, ri *adacorepb.ResourceInfo) error

SetResource - set a resource

Jump to

Keyboard shortcuts

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