triplestore

package
v0.0.0-...-dae269f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	ID         string `json:"id"`
	Title      string `json:"title"`
	URI        string `json:"uri"`
	Type       string `json:"type"`
	SesameType string `json:"sesameType"`
	Location   string `json:"location"`
	Readable   bool   `json:"readable"`
	Writable   bool   `json:"writable"`
	Local      bool   `json:"local"`
}

type Triplestore

type Triplestore struct {
	component.Base

	BaseURL string // upstream server url

	PollInterval time.Duration // duration to wait for during wait
}

func (*Triplestore) Backup

func (ts *Triplestore) Backup(scontext *component.StagingContext) error

Backup makes a backup of all Triplestore repositories databases into the path dest.

func (*Triplestore) BackupName

func (ts *Triplestore) BackupName() string

func (*Triplestore) CreateRepository

func (ts *Triplestore) CreateRepository(ctx context.Context, name, domain, user, password string) error

func (Triplestore) OpenRaw

func (ts Triplestore) OpenRaw(ctx context.Context, method, url string, body any, bodyName string, accept string) (*http.Response, error)

OpenRaw makes an http request to the triplestore api.

When bodyName is non-empty, expect body to be a byte slice representing a multipart/form-data upload with the given name. When bodyName is empty, simply marshal body as application/json

func (*Triplestore) Path

func (ts *Triplestore) Path() string

func (*Triplestore) Provision

func (ts *Triplestore) Provision(ctx context.Context, instance models.Instance, domain string) error

func (*Triplestore) Purge

func (ts *Triplestore) Purge(ctx context.Context, instance models.Instance, domain string) error

func (Triplestore) PurgeRepo

func (ts Triplestore) PurgeRepo(ctx context.Context, repo string) error

PurgeRepo deletes the specified repo from the triplestore. When the repo does not exist, returns no error.

func (Triplestore) PurgeUser

func (ts Triplestore) PurgeUser(ctx context.Context, user string) error

PurgeUser deletes the specified user from the triplestore. When the user does not exist, returns no error.

func (*Triplestore) Snapshot

func (ts *Triplestore) Snapshot(wisski models.Instance, scontext *component.StagingContext) error

func (Triplestore) SnapshotDB

func (ts Triplestore) SnapshotDB(ctx context.Context, dst io.Writer, repo string) (int64, error)

SnapshotDB snapshots the provided repository into dst

func (Triplestore) SnapshotName

func (Triplestore) SnapshotName() string

func (Triplestore) SnapshotNeedsRunning

func (Triplestore) SnapshotNeedsRunning() bool

func (*Triplestore) Stack

func (Triplestore) Update

func (ts Triplestore) Update(ctx context.Context, progress io.Writer) error

func (Triplestore) Wait

func (ts Triplestore) Wait(ctx context.Context) error

Wait waits for the connection to the Triplestore to succeed. This is achieved using a polling strategy.

type TriplestoreUserAppSettings

type TriplestoreUserAppSettings struct {
	DefaultInference      bool `json:"DEFAULT_INFERENCE"`
	DefaultVisGraphSchema bool `json:"DEFAULT_VIS_GRAPH_SCHEMA"`
	DefaultSameas         bool `json:"DEFAULT_SAMEAS"`
	IgnoreSharedQueries   bool `json:"IGNORE_SHARED_QUERIES"`
	ExecuteCount          bool `json:"EXECUTE_COUNT"`
}

type TriplestoreUserPayload

type TriplestoreUserPayload struct {
	Password           string                     `json:"password"`
	AppSettings        TriplestoreUserAppSettings `json:"appSettings"`
	GrantedAuthorities []string                   `json:"grantedAuthorities"`
}

Jump to

Keyboard shortcuts

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