storage

package
v1.1.170 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearResources

func ClearResources() error

ClearResources removes all resources from the

func GetCache

func GetCache(key string) (string, error)

GetCache gets an item from the cache bucket

func PutCache

func PutCache(key, value string) error

PutCache puts an item in the cache bucket

func PutResourceBatch

func PutResourceBatch(key string, value []Resource) error

PutResourceBatch puts a batch of resources into the boltdb

Types

type Resource

type Resource struct {
	ID                string `json:"id"`
	Name              string `json:"n"`
	ResourceGroupID   string `json:"rgid"`
	ResourceGroupName string `json:"rgn"`
}

Resource is the struct used to store crawled resources

func GetAllResources

func GetAllResources() ([]Resource, error)

GetAllResources returns all the resources seen in the last crawl

Jump to

Keyboard shortcuts

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