common

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: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBLAKE2

func GetBLAKE2(jsonld string, v1 *viper.Viper) (string, error)

func GetNormMD5

func GetNormMD5(jsonld string, v1 *viper.Viper) (string, error)

func GetNormSHA

func GetNormSHA(jsonld string, v1 *viper.Viper) (string, error)

GetNormSHA returns the sha hash for a normalized JSON-LD data graph

func GetSHA

func GetSHA(s string) string

GetSHA returns the sha with any string s

func JLD2nq

func JLD2nq(jsonld string, proc *ld.JsonLdProcessor, options *ld.JsonLdOptions) (string, error)

JLD2nq converts JSON-LD documents to NQuads

func JLDProc

func JLDProc(v1 *viper.Viper) (*ld.JsonLdProcessor, *ld.JsonLdOptions)

JLDProc build the JSON-LD processer and sets the options object to use in framing, processing and all JSON-LD actions TODO we create this all the time.. stupidly.. Generate these pointers and pass them around, don't keep making it over and over Ref: https://schema.org/docs/howwework.html and https://schema.org/docs/jsonldcontext.json

func MinioConnection

func MinioConnection(v1 *viper.Viper) *minio.Client

MinioConnection Set up minio and initialize client

func PipeCopyNG

func PipeCopyNG(name, bucket, prefix string, mc *minio.Client) error

Types

type Buffer

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

func (*Buffer) Len

func (b *Buffer) Len() int

func (*Buffer) Read

func (b *Buffer) Read(p []byte) (n int, err error)

func (*Buffer) Reset

func (b *Buffer) Reset()

func (*Buffer) String

func (b *Buffer) String() string

func (*Buffer) Write

func (b *Buffer) Write(p []byte) (n int, err error)

type ContextMapping

type ContextMapping struct {
	Prefix string
	File   string
}

ContextMapping holds the JSON-LD mappings for cached context

type Entry

type Entry struct {
	Bucketname string
	Key        string
	Urlval     string
	Sha1val    string
	Jld        string
}

Entry is a struct holding the json-ld metadata and data (the text)

func GetMillObjects

func GetMillObjects(mc *minio.Client, prefix string) []Entry

GetMillObjects gets the objects for a given miller

func GetShapeGraphs

func GetShapeGraphs(mc *minio.Client, bucketname string) []Entry

GetShapeGraphs gets the shape graphs the shacl miller will use. Currently this is a basic duplication of GetObjects but later this may pull shapes from geoschemas.org so this will change completely. For it pulls from the object store

Jump to

Keyboard shortcuts

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