dataverse

package
v0.0.0-...-e7ac155 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding map[string]struct {
	Type     string      `json:"type"`
	Value    interface{} `json:"value"`
	Lang     *string     `json:"xml:lang,omitempty"`
	Datatype *IRI        `json:"datatype,omitempty"`
}

func (Binding) ResolveValue

func (b Binding) ResolveValue(name string) (*string, error)

type Client

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

func NewClient

func NewClient(ctx context.Context, nodeGrpc, dataverseAddr string, transportCreds credentials.TransportCredentials) (*Client, error)

func (*Client) ExecGovernance

func (c *Client) ExecGovernance(ctx context.Context, govCode, action, subject, zone string) (*GovernanceExecAnswer, error,
)

func (*Client) GetExecutionConsumedResources

func (c *Client) GetExecutionConsumedResources(ctx context.Context, order, execution string) ([]string, error)

func (*Client) GetExecutionOrderContext

func (c *Client) GetExecutionOrderContext(ctx context.Context, order, execSvc string) (*ExecutionOrderContext, error)

func (*Client) GetResourceGovCode

func (c *Client) GetResourceGovCode(ctx context.Context, resource string) (string, error)

func (*Client) GetResourcePublication

func (c *Client) GetResourcePublication(ctx context.Context, resource, servedBy string) (*string, error)

type ExecutionOrderContext

type ExecutionOrderContext struct {
	Zone string

	/// Executions contains for each execution id related to the order, the linked statuses.
	Executions map[string][]string
}

func (*ExecutionOrderContext) ExecutionsInProgress

func (e *ExecutionOrderContext) ExecutionsInProgress() []string

type GovernanceExecAnswer

type GovernanceExecAnswer struct {
	Result   string
	Evidence string
}

type IRI

type IRI struct {
	Prefixed string `json:"prefixed,omitempty"`
	Full     string `json:"full,omitempty"`
}

type Literal

type Literal struct {
	Simple               string `json:"simple,omitempty"`
	LanguageTaggedString *struct {
		Value    string `json:"value"`
		Language string `json:"language"`
	} `json:"language_tagged_string,omitempty"`
	TypedValue *struct {
		Value    string `json:"value"`
		Datatype IRI    `json:"datatype"`
	} `json:"typed_value,omitempty"`
}

type Node

type Node struct {
	NamedNode *IRI   `json:"named_node,omitempty"`
	BlankNode string `json:"blank_node,omitempty"`
}

type Prefix

type Prefix struct {
	Prefix    string `json:"prefix"`
	Namespace string `json:"namespace"`
}

type Select

type Select struct {
	Query SelectQuery `json:"query"`
}

type SelectItem

type SelectItem struct {
	Variable string `json:"variable"`
}

type SelectQuery

type SelectQuery struct {
	Prefixes []Prefix         `json:"prefixes"`
	Select   []SelectItem     `json:"select"`
	Where    []WhereCondition `json:"where"`
	Limit    uint64           `json:"limit"`
}

type SelectResponse

type SelectResponse struct {
	Head struct {
		Vars []string `json:"vars"`
	} `json:"head"`
	Results struct {
		Bindings []Binding `json:"bindings"`
	} `json:"results"`
}

func (*SelectResponse) GetVariableValues

func (r *SelectResponse) GetVariableValues(name string, filters map[string]string) ([]string, error)

type SimpleWhereCondition

type SimpleWhereCondition struct {
	TriplePattern TriplePattern `json:"triple_pattern"`
}

type TriplePattern

type TriplePattern struct {
	Subject   VarOrNode          `json:"subject"`
	Predicate VarOrNamedNode     `json:"predicate"`
	Object    VarOrNodeOrLiteral `json:"object"`
}

type VarOrNamedNode

type VarOrNamedNode struct {
	Variable  string `json:"variable,omitempty"`
	NamedNode *IRI   `json:"named_node,omitempty"`
}

type VarOrNode

type VarOrNode struct {
	Variable string `json:"variable,omitempty"`
	Node     *Node  `json:"node,omitempty"`
}

type VarOrNodeOrLiteral

type VarOrNodeOrLiteral struct {
	Variable string   `json:"variable,omitempty"`
	Node     *Node    `json:"node,omitempty"`
	Literal  *Literal `json:"literal,omitempty"`
}

type WhereCondition

type WhereCondition struct {
	Simple SimpleWhereCondition `json:"simple"`
}

Jump to

Keyboard shortcuts

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