models

package
v0.0.0-...-7b7c10a Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

type Authorization struct {

	// An opaque authorization token authorizing the requesting party to perform a comparison
	// referencing the document in the `scope`.
	//
	AuthToken string `json:"authToken,omitempty"`

	// The authorization's unique ID.
	ID string `json:"id,omitempty"`

	// KeyID in the format of a DID URL that identifies the party granted authorization.
	// Required: true
	RequestingParty *string `json:"requestingParty"`

	// scope
	// Required: true
	Scope *Scope `json:"scope"`
}

Authorization An authorization object encodes the permissions granted to a third party. Its `scope` details the allowed action and the object on which the action will be performed. The `requestingParty` is the third party allowed to perform those actions.

The `authToken` is an opaque tokens granting the `requestingParty` the priviledge of running a comparison with the document identified in `scope` at the remote Confidential Storage Hub.

Example: {"requestingParty":"did:example:party_doing_comparison","scope":[{"actions":["compare"],"caveats":[{"duration":600,"type":"expiry"}],"docID":"batphone","vaultID":"did:example:123"}]}

swagger:model Authorization

func (*Authorization) ContextValidate

func (m *Authorization) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this authorization based on the context it is used

func (*Authorization) MarshalBinary

func (m *Authorization) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Authorization) UnmarshalBinary

func (m *Authorization) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Authorization) Validate

func (m *Authorization) Validate(formats strfmt.Registry) error

Validate validates this authorization

type AuthorizedQuery

type AuthorizedQuery struct {

	// auth token
	// Required: true
	AuthToken *string `json:"authToken"`
	// contains filtered or unexported fields
}

AuthorizedQuery AuthorizedQuery is a query that has been pre-authorized by another Comparator. The AuthorizedQuery's `authToken` is the authorization token handed back by the other Comparator authorizing the comparison on a document.

swagger:model AuthorizedQuery

func (*AuthorizedQuery) ContextValidate

func (m *AuthorizedQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this authorized query based on the context it is used

func (*AuthorizedQuery) ID

func (m *AuthorizedQuery) ID() string

ID gets the id of this subtype

func (*AuthorizedQuery) MarshalBinary

func (m *AuthorizedQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (AuthorizedQuery) MarshalJSON

func (m AuthorizedQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*AuthorizedQuery) SetID

func (m *AuthorizedQuery) SetID(val string)

SetID sets the id of this subtype

func (*AuthorizedQuery) SetType

func (m *AuthorizedQuery) SetType(val string)

SetType sets the type of this subtype

func (*AuthorizedQuery) Type

func (m *AuthorizedQuery) Type() string

Type gets the type of this subtype

func (*AuthorizedQuery) UnmarshalBinary

func (m *AuthorizedQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AuthorizedQuery) UnmarshalJSON

func (m *AuthorizedQuery) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*AuthorizedQuery) Validate

func (m *AuthorizedQuery) Validate(formats strfmt.Registry) error

Validate validates this authorized query

type Caveat

type Caveat interface {
	runtime.Validatable
	runtime.ContextValidatable

	// type
	// Required: true
	Type() string
	SetType(string)
}

Caveat Caveats place constraints on the scope of an authorization. For example, an authorization may allow to compare a document but only for a certain length of time (caveat).

swagger:discriminator Caveat type

func UnmarshalCaveat

func UnmarshalCaveat(reader io.Reader, consumer runtime.Consumer) (Caveat, error)

UnmarshalCaveat unmarshals polymorphic Caveat

func UnmarshalCaveatSlice

func UnmarshalCaveatSlice(reader io.Reader, consumer runtime.Consumer) ([]Caveat, error)

UnmarshalCaveatSlice unmarshals polymorphic slices of Caveat

type Comparison

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

Comparison A comparison is a request to compare two or more documents.

Comparisons have an operator that determines the kind of comparison to be performed.

Example: {"op":{"args":[{"authTokens":{"edv":"21tDAKCERh95uGgKbJNHYp","kms":"bcehfew7h32f32h7af3"},"docID":"batphone","type":"DocQuery","vaultID":"did:example:123"},{"authToken":"123456789abcdefghi","type":"AuthorizedQuery"}],"type":"EqOp"}}

swagger:model Comparison

func (*Comparison) ContextValidate

func (m *Comparison) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this comparison based on the context it is used

func (*Comparison) MarshalBinary

func (m *Comparison) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (Comparison) MarshalJSON

func (m Comparison) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*Comparison) Op

func (m *Comparison) Op() Operator

Op gets the op of this base type

func (*Comparison) SetOp

func (m *Comparison) SetOp(val Operator)

SetOp sets the op of this base type

func (*Comparison) UnmarshalBinary

func (m *Comparison) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Comparison) UnmarshalJSON

func (m *Comparison) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*Comparison) Validate

func (m *Comparison) Validate(formats strfmt.Registry) error

Validate validates this comparison

type ComparisonResult

type ComparisonResult struct {

	// result
	Result bool `json:"result,omitempty"`
}

ComparisonResult comparison result

swagger:model ComparisonResult

func (*ComparisonResult) ContextValidate

func (m *ComparisonResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this comparison result based on context it is used

func (*ComparisonResult) MarshalBinary

func (m *ComparisonResult) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ComparisonResult) UnmarshalBinary

func (m *ComparisonResult) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ComparisonResult) Validate

func (m *ComparisonResult) Validate(formats strfmt.Registry) error

Validate validates this comparison result

type Config

type Config struct {

	// The comparator's authentication key's keyID in the format of a DID URL.
	AuthKeyURL string `json:"authKeyURL,omitempty"`

	// The comparator's unique DID.
	// Required: true
	Did *string `json:"did"`

	// A JWK Set containing the primary public/private key pair.
	// Required: true
	Key interface{} `json:"key"`
}

Config config

swagger:model Config

func (*Config) ContextValidate

func (m *Config) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this config based on context it is used

func (*Config) MarshalBinary

func (m *Config) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Config) UnmarshalBinary

func (m *Config) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Config) Validate

func (m *Config) Validate(formats strfmt.Registry) error

Validate validates this config

type DocQuery

type DocQuery struct {

	// auth tokens
	// Required: true
	AuthTokens *DocQueryAO1AuthTokens `json:"authTokens"`

	// By default, a DocQuery identifies a document in its entirety, which means the entire contents of the
	// document are used in the comparison. `docAttrPath` is a JSONPath that allows a _portion_ of the
	// document to be used during the comparison.
	//
	DocAttrPath string `json:"docAttrPath,omitempty"`

	// an identifier for a document stored in the Vault Server.
	// Required: true
	DocID *string `json:"docID"`

	// vault ID
	// Required: true
	VaultID *string `json:"vaultID"`
	// contains filtered or unexported fields
}

DocQuery DocQuery identifies a document by directly referencing the document's Vault Server vaultID and docID. It also contains the necessary authorization tokens to access the document at the remote Confidential Storage vault and decrypt with the WebKMS key.

swagger:model DocQuery

func (*DocQuery) ContextValidate

func (m *DocQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this doc query based on the context it is used

func (*DocQuery) ID

func (m *DocQuery) ID() string

ID gets the id of this subtype

func (*DocQuery) MarshalBinary

func (m *DocQuery) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (DocQuery) MarshalJSON

func (m DocQuery) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*DocQuery) SetID

func (m *DocQuery) SetID(val string)

SetID sets the id of this subtype

func (*DocQuery) SetType

func (m *DocQuery) SetType(val string)

SetType sets the type of this subtype

func (*DocQuery) Type

func (m *DocQuery) Type() string

Type gets the type of this subtype

func (*DocQuery) UnmarshalBinary

func (m *DocQuery) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DocQuery) UnmarshalJSON

func (m *DocQuery) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*DocQuery) Validate

func (m *DocQuery) Validate(formats strfmt.Registry) error

Validate validates this doc query

type DocQueryAO1AuthTokens

type DocQueryAO1AuthTokens struct {

	// edv
	Edv string `json:"edv,omitempty"`

	// kms
	Kms string `json:"kms,omitempty"`
}

DocQueryAO1AuthTokens doc query a o1 auth tokens

swagger:model DocQueryAO1AuthTokens

func (*DocQueryAO1AuthTokens) ContextValidate

func (m *DocQueryAO1AuthTokens) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this doc query a o1 auth tokens based on context it is used

func (*DocQueryAO1AuthTokens) MarshalBinary

func (m *DocQueryAO1AuthTokens) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DocQueryAO1AuthTokens) UnmarshalBinary

func (m *DocQueryAO1AuthTokens) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DocQueryAO1AuthTokens) Validate

func (m *DocQueryAO1AuthTokens) Validate(formats strfmt.Registry) error

Validate validates this doc query a o1 auth tokens

type EqOp

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

EqOp eq op

swagger:model EqOp

func (*EqOp) Args

func (m *EqOp) Args() []Query

Args gets the args of this subtype

func (*EqOp) ContextValidate

func (m *EqOp) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this eq op based on the context it is used

func (*EqOp) MarshalBinary

func (m *EqOp) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (EqOp) MarshalJSON

func (m EqOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*EqOp) SetArgs

func (m *EqOp) SetArgs(val []Query)

SetArgs sets the args of this subtype

func (*EqOp) SetType

func (m *EqOp) SetType(val string)

SetType sets the type of this subtype

func (*EqOp) Type

func (m *EqOp) Type() string

Type gets the type of this subtype

func (*EqOp) UnmarshalBinary

func (m *EqOp) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*EqOp) UnmarshalJSON

func (m *EqOp) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*EqOp) Validate

func (m *EqOp) Validate(formats strfmt.Registry) error

Validate validates this eq op

type Error

type Error struct {

	// err message
	ErrMessage string `json:"errMessage,omitempty"`
}

Error error

swagger:model Error

func (*Error) ContextValidate

func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

type ExpiryCaveat

type ExpiryCaveat struct {

	// Duration (in seconds) for which this authorization will remain valid.
	Duration int64 `json:"duration,omitempty"`
}

ExpiryCaveat expiry caveat

swagger:model ExpiryCaveat

func (*ExpiryCaveat) ContextValidate

func (m *ExpiryCaveat) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this expiry caveat based on the context it is used

func (*ExpiryCaveat) MarshalBinary

func (m *ExpiryCaveat) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (ExpiryCaveat) MarshalJSON

func (m ExpiryCaveat) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*ExpiryCaveat) SetType

func (m *ExpiryCaveat) SetType(val string)

SetType sets the type of this subtype

func (*ExpiryCaveat) Type

func (m *ExpiryCaveat) Type() string

Type gets the type of this subtype

func (*ExpiryCaveat) UnmarshalBinary

func (m *ExpiryCaveat) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ExpiryCaveat) UnmarshalJSON

func (m *ExpiryCaveat) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*ExpiryCaveat) Validate

func (m *ExpiryCaveat) Validate(formats strfmt.Registry) error

Validate validates this expiry caveat

type Extract

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

Extract extract

swagger:model Extract

func (*Extract) ContextValidate

func (m *Extract) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this extract based on the context it is used

func (*Extract) MarshalBinary

func (m *Extract) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (Extract) MarshalJSON

func (m Extract) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*Extract) Queries

func (m *Extract) Queries() []Query

Queries gets the queries of this base type

func (*Extract) SetQueries

func (m *Extract) SetQueries(val []Query)

SetQueries sets the queries of this base type

func (*Extract) UnmarshalBinary

func (m *Extract) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Extract) UnmarshalJSON

func (m *Extract) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*Extract) Validate

func (m *Extract) Validate(formats strfmt.Registry) error

Validate validates this extract

type ExtractResp

type ExtractResp struct {

	// documents
	// Required: true
	Documents []*ExtractRespDocumentsItems0 `json:"documents"`
}

ExtractResp extract resp

swagger:model ExtractResp

func (*ExtractResp) ContextValidate

func (m *ExtractResp) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this extract resp based on the context it is used

func (*ExtractResp) MarshalBinary

func (m *ExtractResp) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ExtractResp) UnmarshalBinary

func (m *ExtractResp) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ExtractResp) Validate

func (m *ExtractResp) Validate(formats strfmt.Registry) error

Validate validates this extract resp

type ExtractRespDocumentsItems0

type ExtractRespDocumentsItems0 struct {

	// contents
	Contents interface{} `json:"contents,omitempty"`

	// id
	ID string `json:"id,omitempty"`
}

ExtractRespDocumentsItems0 extract resp documents items0

swagger:model ExtractRespDocumentsItems0

func (*ExtractRespDocumentsItems0) ContextValidate

func (m *ExtractRespDocumentsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this extract resp documents items0 based on context it is used

func (*ExtractRespDocumentsItems0) MarshalBinary

func (m *ExtractRespDocumentsItems0) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ExtractRespDocumentsItems0) UnmarshalBinary

func (m *ExtractRespDocumentsItems0) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ExtractRespDocumentsItems0) Validate

func (m *ExtractRespDocumentsItems0) Validate(formats strfmt.Registry) error

Validate validates this extract resp documents items0

type Operator

type Operator interface {
	runtime.Validatable
	runtime.ContextValidatable

	// type
	// Required: true
	Type() string
	SetType(string)
}

Operator Operators indicate the kind of comparison operation to be performed.

swagger:discriminator Operator type

func UnmarshalOperator

func UnmarshalOperator(reader io.Reader, consumer runtime.Consumer) (Operator, error)

UnmarshalOperator unmarshals polymorphic Operator

func UnmarshalOperatorSlice

func UnmarshalOperatorSlice(reader io.Reader, consumer runtime.Consumer) ([]Operator, error)

UnmarshalOperatorSlice unmarshals polymorphic slices of Operator

type Query

type Query interface {
	runtime.Validatable
	runtime.ContextValidatable

	// id
	ID() string
	SetID(string)

	// type
	// Required: true
	Type() string
	SetType(string)
}

Query A query identifies a document to be compared.

swagger:discriminator Query type

func UnmarshalQuery

func UnmarshalQuery(reader io.Reader, consumer runtime.Consumer) (Query, error)

UnmarshalQuery unmarshals polymorphic Query

func UnmarshalQuerySlice

func UnmarshalQuerySlice(reader io.Reader, consumer runtime.Consumer) ([]Query, error)

UnmarshalQuerySlice unmarshals polymorphic slices of Query

type Scope

type Scope struct {

	// actions
	// Required: true
	Actions []string `json:"actions"`

	// auth tokens
	// Required: true
	AuthTokens *ScopeAuthTokens `json:"authTokens"`

	// Optional json path. Authorizes the comparison of a portion of the document.
	DocAttrPath string `json:"docAttrPath,omitempty"`

	// an identifier for a document stored in the Vault Server.
	// Required: true
	DocID *string `json:"docID"`

	// the Vault Server ID (DID)
	VaultID string `json:"vaultID,omitempty"`
	// contains filtered or unexported fields
}

Scope scope

swagger:model Scope

func (*Scope) Caveats

func (m *Scope) Caveats() []Caveat

Caveats gets the caveats of this base type

func (*Scope) ContextValidate

func (m *Scope) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this scope based on the context it is used

func (*Scope) MarshalBinary

func (m *Scope) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (Scope) MarshalJSON

func (m Scope) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*Scope) SetCaveats

func (m *Scope) SetCaveats(val []Caveat)

SetCaveats sets the caveats of this base type

func (*Scope) UnmarshalBinary

func (m *Scope) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Scope) UnmarshalJSON

func (m *Scope) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*Scope) Validate

func (m *Scope) Validate(formats strfmt.Registry) error

Validate validates this scope

type ScopeAuthTokens

type ScopeAuthTokens struct {

	// edv
	Edv string `json:"edv,omitempty"`

	// kms
	Kms string `json:"kms,omitempty"`
}

ScopeAuthTokens scope auth tokens

swagger:model ScopeAuthTokens

func (*ScopeAuthTokens) ContextValidate

func (m *ScopeAuthTokens) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this scope auth tokens based on context it is used

func (*ScopeAuthTokens) MarshalBinary

func (m *ScopeAuthTokens) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ScopeAuthTokens) UnmarshalBinary

func (m *ScopeAuthTokens) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ScopeAuthTokens) Validate

func (m *ScopeAuthTokens) Validate(formats strfmt.Registry) error

Validate validates this scope auth tokens

Jump to

Keyboard shortcuts

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