acquire

package
v0.0.0-...-c180764 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delayrequest

func Delayrequest(v1 *viper.Viper) (int64, error)

func GetDriveCredentials

func GetDriveCredentials(authFilename string) (srv *drive.Service, err error)

func GetFileFromGDrive

func GetFileFromGDrive(srv *drive.Service, fileId string) (*drive.File, string, error)

We get this: but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.

https://support.google.com/websearch/answer/86640

<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title> Sorry...</title><style> body { font-family: verdana, arial, sans-serif; background-color: #fff; color: #000; }</style></head><body><div><table><tr><td><b><font face=sans-serif size=10><font color=#4285f4>G</font><font color=#ea4335>o</font><font color=#fbbc05>o</font><font color=#4285f4>g</font><font color=#34a853>l</font><font color=#ea4335>e</font></font></b></td><td style="text-align: left; vertical-align: bottom; padding-bottom: 15px; width: 50%"><div style="border-bottom: 1px solid #dfdfdf;">Sorry...</div></td></tr></table></div><div style="margin-left: 4em;"><h1>We're sorry...</h1><p>... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.</p></div><div style="margin-left: 4em;">See <a href="https://support.google.com/websearch/answer/86640">Google Help</a> for more information.<br/><br/></div><div style="text-align: center; border-top: 1px solid #dfdfdf;"><a href="https://www.google.com">Google Home</a></div></body></html>

func GetFileList

func GetFileList(srv *drive.Service, parentFolder string, isSharedDrive bool, sharedDriveId string) ([]*drive.File,
	error)

func GetFromGDrive

func GetFromGDrive(mc *minio.Client, v1 *viper.Viper) (string, error)

func GetGraph

func GetGraph(mc *minio.Client, v1 *viper.Viper) (string, error)

GetGraph downloads pre-built site graphs

func HeadlessNG

func HeadlessNG(v1 *viper.Viper, mc *minio.Client, m map[string][]string, db *bolt.DB)

HeadlessNG gets schema.org entries in sites that put the JSON-LD in dynamically with JS. It uses a chrome headless instance (which MUST BE RUNNING). TODO.. trap out error where headless is NOT running

func PageRender

func PageRender(v1 *viper.Viper, mc *minio.Client, logger *log.Logger, timeout time.Duration, url, k string, db *bolt.DB) error

func ResRetrieve

func ResRetrieve(v1 *viper.Viper, mc *minio.Client, m map[string][]string, db *bolt.DB)

ResRetrieve is a function to pull down the data graphs at resources

func ResourceURLs

func ResourceURLs(v1 *viper.Viper, mc *minio.Client, headless bool, db *bolt.DB) map[string][]string

ResourceURLs looks gets the resource URLs for a domain. The results is a map with domain name as key and []string of the URLs to process.

func StoreProv

func StoreProv(v1 *viper.Viper, mc *minio.Client, k, sha, urlloc string) error

StoreProv creates and stores a prov record for each JSON-LD data graph k is the domain / provider sha is the sha of the JSON-LD file summoned urlloc is the URL for the resource (source URL)

func StoreProvNG

func StoreProvNG(v1 *viper.Viper, mc *minio.Client, k, sha, urlloc, objprefix string) error

func Threadcount

func Threadcount(v1 *viper.Viper) (int64, error)

func ThreadedHeadlessNG

func ThreadedHeadlessNG(v1 *viper.Viper, mc *minio.Client, m map[string][]string, db *bolt.DB)

ThreadedHeadlessNG does not work.. ;)

func Upload

func Upload(v1 *viper.Viper, mc *minio.Client, logger *log.Logger, bucketName string, site string, urlloc string, jsonld string) (string, error)

Types

type ProvData

type ProvData struct {
	RESID  string
	SHA256 string
	PID    string
	SOURCE string
	DATE   string
	RUNID  string
	URN    string
	PNAME  string
	DOMAIN string
}

ProvData is the struct holding the prov data for a summoned data graph

type Sources

type Sources = configTypes.Sources

Jump to

Keyboard shortcuts

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