triplestore

package
v0.0.0-...-b197db6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 22 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 RequestHeaders

type RequestHeaders struct {
	Accept      string
	ContentType string
}

RequestHeaders represent headers of a raw http request

func (*RequestHeaders) With

func (rh *RequestHeaders) With(headers RequestHeaders) *RequestHeaders

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) DoRest

func (ts *Triplestore) DoRest(ctx context.Context, timeout time.Duration, method, url string, headers *RequestHeaders) (*http.Response, error)

DoRest performs a (raw) http request to the without a body.

func (*Triplestore) DoRestWithForm

func (ts *Triplestore) DoRestWithForm(ctx context.Context, timeout time.Duration, method, url string, headers *RequestHeaders, fieldname string, fieldvalue io.Reader) (*http.Response, error)

DoRestWithForm performs a http request where the body are all bytes read from fieldvalue.

func (*Triplestore) DoRestWithMarshal

func (ts *Triplestore) DoRestWithMarshal(ctx context.Context, timeout time.Duration, method, url string, headers *RequestHeaders, body any) (*http.Response, error)

DoRestWithReader performs a http request where the body is copied from the given io.Reader. The caller must ensure the reader is closed.

func (*Triplestore) DoRestWithReader

func (ts *Triplestore) DoRestWithReader(ctx context.Context, timeout time.Duration, method string, url string, headers *RequestHeaders, body io.Reader) (*http.Response, error)

DoRestWithReader performs a http request where the body is copied from the given io.Reader. The caller must ensure the reader is closed.

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) RestoreDB

func (ts Triplestore) RestoreDB(ctx context.Context, repo string, reader io.Reader) error

RestoreDB snapshots the provided repository into dst

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