Documentation ¶
Index ¶
- Constants
- func ConfigureStack(token string, params map[string]interface{}) error
- func CreateObject(token string, params map[string]interface{}) (interface{}, error)
- func UpdateObject(token, id string, params map[string]interface{}) error
- func UpdateWorkgroup(id, token string, params map[string]interface{}) error
- type BaselineContext
- type BaselineRecord
- type Config
- type IssueVerifiableCredentialRequest
- type IssueVerifiableCredentialResponse
- type Message
- type Participant
- type ProtocolMessage
- type ProtocolMessagePayload
- type Service
- type Workflow
- type Workgroup
- type Workstep
Constants ¶
const ProtocolMessageOpcodeBaseline = "BLINE"
const ProtocolMessageOpcodeJoin = "JOIN"
const ProtocolMessageOpcodeSync = "SYNC"
Variables ¶
This section is empty.
Functions ¶
func ConfigureStack ¶
ConfigureStack updates the global configuration on the local baseline stack
func CreateObject ¶
CreateObject is a generic way to baseline a business object
func UpdateObject ¶
UpdateObject updates a business object
func UpdateWorkgroup ¶
UpdateWorkgroup updates a previously-initialized workgroup on the local baseline stack
Types ¶
type BaselineContext ¶
type BaselineContext struct { ID *uuid.UUID `sql:"-" json:"id,omitempty"` BaselineID *uuid.UUID `sql:"-" json:"baseline_id,omitempty"` Records []*BaselineRecord `sql:"-" json:"records,omitempty"` Workflow *Workflow `sql:"-" json:"-"` WorkflowID *uuid.UUID `sql:"-" json:"workflow_id"` }
BaselineContext represents a collection of BaselineRecord instances in the context of a workflow
type BaselineRecord ¶
type BaselineRecord struct { ID *string `sql:"-" json:"id,omitempty"` BaselineID *uuid.UUID `sql:"-" json:"baseline_id,omitempty"` Context *BaselineContext `sql:"-" json:"-"` ContextID *uuid.UUID `sql:"-" json:"context_id"` Type *string `sql:"-" json:"type"` }
BaselineRecord represents a link between an object in the internal system of record and the external BaselineContext
type Config ¶
type Config struct { Counterparties []*Participant `sql:"-" json:"counterparties,omitempty"` Env map[string]string `sql:"-" json:"env,omitempty"` Errors []*api.Error `sql:"-" json:"errors,omitempty"` NetworkID *uuid.UUID `sql:"-" json:"network_id,omitempty"` OrganizationAddress *string `sql:"-" json:"organization_address,omitempty"` OrganizationID *uuid.UUID `sql:"-" json:"organization_id,omitempty"` OrganizationRefreshToken *string `sql:"-" json:"organization_refresh_token,omitempty"` RegistryContractAddress *string `sql:"-" json:"registry_contract_address,omitempty"` }
Config represents the proxy configuration
type IssueVerifiableCredentialRequest ¶
type IssueVerifiableCredentialRequest struct { Address *string `json:"address,omitempty"` OrganizationID *uuid.UUID `json:"organization_id,omitempty"` PublicKey *string `json:"public_key,omitempty"` Signature *string `json:"signature"` }
IssueVerifiableCredentialRequest represents a request to issue a verifiable credential
type IssueVerifiableCredentialResponse ¶
type IssueVerifiableCredentialResponse struct {
VC *string `json:"credential"`
}
IssueVerifiableCredentialResponse represents a response to a VC issuance request
type Message ¶
type Message struct { ID *string `sql:"-" json:"id,omitempty"` BaselineID *uuid.UUID `sql:"-" json:"baseline_id,omitempty"` // optional; when included, can be used to map outbound message just-in-time Errors []*api.Error `sql:"-" json:"errors,omitempty"` MessageID *string `sql:"-" json:"message_id,omitempty"` Payload interface{} `sql:"-" json:"payload,omitempty"` ProtocolMessage *ProtocolMessage `sql:"-" json:"protocol_message,omitempty"` Recipients []*Participant `sql:"-" json:"recipients"` Status *string `sql:"-" json:"status,omitempty"` Type *string `sql:"-" json:"type,omitempty"` }
Message is a proxy-internal wrapper for protocol message handling
type Participant ¶
type Participant struct { Address *string `sql:"-" json:"address"` Metadata map[string]interface{} `sql:"-" json:"metadata,omitempty"` APIEndpoint *string `sql:"-" json:"api_endpoint,omitempty"` MessagingEndpoint *string `sql:"-" json:"messaging_endpoint,omitempty"` }
Participant is a party to a baseline workgroup or workflow context
type ProtocolMessage ¶
type ProtocolMessage struct { BaselineID *uuid.UUID `sql:"-" json:"baseline_id,omitempty"` Opcode *string `sql:"-" json:"opcode,omitempty"` Sender *string `sql:"-" json:"sender,omitempty"` Recipient *string `sql:"-" json:"recipient,omitempty"` Shield *string `sql:"-" json:"shield,omitempty"` Identifier *uuid.UUID `sql:"-" json:"identifier,omitempty"` Signature *string `sql:"-" json:"signature,omitempty"` Type *string `sql:"-" json:"type,omitempty"` Payload *ProtocolMessagePayload `sql:"-" json:"payload,omitempty"` }
ProtocolMessage is a baseline protocol message see https://github.com/ethereum-oasis/baseline/blob/master/core/types/src/protocol.ts
type ProtocolMessagePayload ¶
type ProtocolMessagePayload struct { Object map[string]interface{} `sql:"-" json:"object,omitempty"` Proof *string `sql:"-" json:"proof,omitempty"` Type *string `sql:"-" json:"type,omitempty"` Witness interface{} `sql:"-" json:"witness,omitempty"` }
ProtocolMessagePayload is a baseline protocol message payload
type Service ¶
Service for the baseline api
func InitBaselineService ¶
InitBaselineService convenience method to initialize a `baseline.Service` instance
type Workflow ¶
type Workflow struct { ID *uuid.UUID `sql:"-" json:"id,omitempty"` Errors []*api.Error `sql:"-" json:"errors,omitempty"` Participants []*Participant `sql:"-" json:"participants"` Shield *string `sql:"-" json:"shield,omitempty"` Worksteps []*Workstep `sql:"-" json:"worksteps,omitempty"` }
Workflow is a baseline workflow context
func CreateWorkflow ¶
CreateWorkflow initializes a new workflow on the local baseline stack
type Workgroup ¶
type Workgroup struct { ID *uuid.UUID `sql:"-" json:"id,omitempty"` Errors []*api.Error `sql:"-" json:"errors,omitempty"` Participants []*Participant `sql:"-" json:"participants"` Workflows []*Workflow `json:"workflows,omitempty"` PrivacyPolicy interface{} `json:"privacy_policy"` // outlines data visibility rules for each participant SecurityPolicy interface{} `json:"security_policy"` // consists of authentication and authorization rules for the workgroup participants TokenizationPolicy interface{} `json:"tokenization_policy"` // consists of policies governing tokenization of workflow outputs }
Workgroup is a baseline workgroup context
func CreateWorkgroup ¶
CreateWorkgroup initializes a new or previously-joined workgroup on the local baseline stack
type Workstep ¶
type Workstep struct { ID *uuid.UUID `sql:"-" json:"id,omitempty"` Circuit *privacy.Circuit `sql:"-" json:"circuit,omitempty"` CircuitID *uuid.UUID `sql:"-" json:"circuit_id"` Errors []*api.Error `sql:"-" json:"errors,omitempty"` Participants []*Participant `sql:"-" json:"participants"` RequireFinality bool `sql:"-" json:"require_finality"` WorkflowID *uuid.UUID `sql:"-" json:"workflow_id,omitempty"` }
Workstep is a baseline workflow context
func CreateWorkstep ¶
CreateWorkstep initializes a new workstep on the local baseline stack