axiom

package
v0.0.0-...-1e47281 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ProtocolMessageOpcodeAxiom = "AXIOM"
View Source
const ProtocolMessageOpcodeJoin = "JOIN"
View Source
const ProtocolMessageOpcodeSync = "SYNC"

Variables

This section is empty.

Functions

func CreateWorkstepParticipant

func CreateWorkstepParticipant(token, workflowID, workstepID string, params map[string]interface{}) error

CreateWorkstepParticipant adds a participant to a given workstep

func DeleteMapping

func DeleteMapping(token, mappingID string) error

DeleteMapping deletes a mapping

func DeleteSystem

func DeleteSystem(token, workgroupID, systemID string) error

DeleteSystem deletes a system

func DeleteWorkstepParticipant

func DeleteWorkstepParticipant(token, workflowID, workstepID, address string) error

DeleteWorkstepParticipant removes a participant from a given workstep

func ExecuteWorkstep

func ExecuteWorkstep(token, workflowID, workstepID string, params map[string]interface{}) (interface{}, error)

ExecuteWorkstep executes a specific workstep

func SendProtocolMessage

func SendProtocolMessage(token string, params map[string]interface{}) (interface{}, error)

SendProtocolMessage is a generic way to dispatch a protocol message

func Status

func Status() error

Status returns the status of the service

func SubjectAccountIDFactory

func SubjectAccountIDFactory(organizationID, workgroupID string) string

SubjectAccountIDFactory returns H(organization_id, workgroup_id)

func SystemReachability

func SystemReachability(token string, params map[string]interface{}) error

SystemReachability returns whether a system of record is a valid tenant and if so, configures said tenant

func UpdateMapping

func UpdateMapping(token, mappingID string, params map[string]interface{}) error

UpdateMapping updates a mapping

func UpdateSubjectAccount

func UpdateSubjectAccount(token, organizationID, subjectAccountID string, params map[string]interface{}) error

UpdateSubjectAccount updates a BPI subject account

func UpdateSystem

func UpdateSystem(token, workgroupID, systemID string, params map[string]interface{}) error

UpdateSystem updates a axiom system of record

func UpdateWorkflow

func UpdateWorkflow(token, workflowID string, params map[string]interface{}) error

UpdateWorkflow updates a axiom workflow

func UpdateWorkgroup

func UpdateWorkgroup(token, workgroupID string, params map[string]interface{}) error

UpdateWorkgroup updates a axiom workgroup

func UpdateWorkstep

func UpdateWorkstep(token, workflowID, workstepID string, params map[string]interface{}) error

UpdateWorkstep updates a axiom workstep

Types

type ActivityAPIResponseItem

type ActivityAPIResponseItem struct {
	Metadata  *json.RawMessage `json:"metadata,omitempty"`
	Subtitle  *string          `json:"subtitle"`
	Timestamp *time.Time       `json:"timestamp"`
	Title     *string          `json:"title"`

	WorkflowID *uuid.UUID `json:"workflow_id"`
	WorkstepID *uuid.UUID `json:"workstep_id"`
}

ActivityAPIResponseItem is a single activity item for inclusion in the `WorkgroupDashboardAPIResponse`

type AnalyticsAPIResponse

type AnalyticsAPIResponse struct {
	Metadata *json.RawMessage          `json:"metadata,omitempty"`
	Tree     *TreeAnalyticsAPIResponse `json:"tree"`
}

AnalyticsAPIResponse is the analytics item for inclusion in the `WorkgroupDashboardAPIResponse`

type AxiomClaims

type AxiomClaims struct {
	jwt.MapClaims
	BPIEndpoint             *string `json:"bpi_endpoint,omitempty"`
	RegistryContractAddress *string `json:"registry_contract_address"`
	WorkgroupID             *string `json:"workgroup_id"`
}

AxiomClaims represent JWT claims encoded within a generic verifiable credential for use with the axiom protocol

type AxiomContext

type AxiomContext struct {
	ID         *uuid.UUID        `sql:"-" json:"id,omitempty"`
	AxiomID    *uuid.UUID        `sql:"-" json:"axiom_id,omitempty"`
	Records    []*AxiomRecord    `sql:"-" json:"records,omitempty"`
	Workflow   *WorkflowInstance `sql:"-" json:"-"`
	WorkflowID *uuid.UUID        `sql:"-" json:"workflow_id"`
}

AxiomContext represents a collection of AxiomRecord instances in the context of a workflow

type AxiomInviteClaims

type AxiomInviteClaims struct {
	AxiomClaims
	InvitorBPIEndpoint         *string `json:"invitor_bpi_endpoint,omitempty"`
	InvitorOrganizationAddress *string `json:"invitor_organization_address"`
	InvitorSubjectAccountID    *string `json:"invitor_subject_account_id"`
}

AxiomInviteClaims represent JWT claims encoded within an verifiable credential representing an invitation

type AxiomRecord

type AxiomRecord struct {
	ID        *string       `sql:"-" json:"id,omitempty"`
	AxiomID   *uuid.UUID    `sql:"-" json:"axiom_id,omitempty"`
	Context   *AxiomContext `sql:"-" json:"-"`
	ContextID *uuid.UUID    `sql:"-" json:"context_id"`
	Type      *string       `sql:"-" json:"type"`
}

AxiomRecord represents a link between an object in the internal system of record and the external AxiomContext

type ClaimParams

type ClaimParams struct {
	AuthorizedBearerToken    *string    `json:"authorized_bearer_token,omitempty"`
	IsOrganizationInvite     bool       `json:"is_organization_invite,omitempty"`
	IsOrganizationUserInvite bool       `json:"is_organization_user_invite,omitempty"`
	OperatorSeparationDegree uint32     `json:"operator_separation_degree"`
	Workgroup                *Workgroup `json:"workgroup"`
}

PRVDClaims represent JWT invitation PRVD data claim params

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"`
	WorkgroupID              *uuid.UUID        `sql:"-" json:"workgroup_id,omitempty"`
	OrganizationRefreshToken *string           `sql:"-" json:"organization_refresh_token,omitempty"`
	RegistryContractAddress  *string           `sql:"-" json:"registry_contract_address,omitempty"`
}

Config represents the instance configuration

type DataClaims

type DataClaims struct {
	ApplicationID    *uuid.UUID   `json:"application_id"`
	Email            *string      `json:"email"`
	FirstName        *string      `json:"first_name"`
	InvitorID        *uuid.UUID   `json:"invitor_id"`
	InvitorName      *string      `json:"invitor_name"`
	LastName         *string      `json:"last_name"`
	OrganizationID   *uuid.UUID   `json:"organization_id"`
	OrganizationName *string      `json:"organization_name"`
	Params           *ClaimParams `json:"params"`
	UserID           *uuid.UUID   `json:"user_id"`
}

PRVDClaims represent JWT invitation PRVD data claims

type InviteClaims

type InviteClaims struct {
	jwt.StandardClaims
	NATS *NATSClaims `json:"nats"`
	PRVD *PRVDClaims `json:"prvd"`
}

InviteClaims represent JWT invitation claims

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"`
	WorkgroupID    *uuid.UUID `json:"workgroup_id,omitempty"`
}

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 Mapping

type Mapping struct {
	api.Model
	Models      []*MappingModel `json:"models"`
	Name        string          `json:"name"`
	Description *string         `json:"description"`
	Type        *string         `json:"type"`

	OrganizationID *uuid.UUID `json:"organization_id"`
	Ref            *string    `json:"ref,omitempty"`
	RefMappingID   *uuid.UUID `json:"ref_mapping_id"`
	Version        *string    `json:"version"`
	WorkgroupID    *uuid.UUID `json:"workgroup_id"`
}

Mapping for arbitrary model transformations

func CreateMapping

func CreateMapping(token string, params map[string]interface{}) (*Mapping, error)

CreateMapping creates a mapping using the given params

func ListMappings

func ListMappings(token string, params map[string]interface{}) ([]*Mapping, error)

ListMappings lists mappings using the given params

type MappingField

type MappingField struct {
	api.Model
	DefaultValue interface{} `json:"default_value,omitempty"`
	IsPrimaryKey bool        `json:"is_primary_key"`
	Name         string      `json:"name"`
	Description  *string     `json:"description"`
	Type         string      `json:"type"`

	MappingModelID uuid.UUID  `json:"mapping_model_id"` // gorm: "column:mappingmodel_id"
	RefFieldID     *uuid.UUID `json:"ref_field_id"`
}

MappingField for mapping

type MappingModel

type MappingModel struct {
	api.Model
	Description *string `json:"description"`
	PrimaryKey  *string `json:"primary_key"`
	Standard    *string `json:"standard"`
	Type        *string `json:"type"`

	MappingID  uuid.UUID       `json:"mapping_id"`
	RefModelID *uuid.UUID      `json:"ref_model_id"`
	Fields     []*MappingField `sql:"-" json:"fields"`
}

MappingModel consists of fields for mapping

type Message

type Message struct {
	ID              *string          `sql:"-" json:"id,omitempty"`
	AxiomID         *uuid.UUID       `sql:"-" json:"axiom_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"`
	// contains filtered or unexported fields
}

Message is a proxy-internal wrapper for protocol message handling

type NATSClaims

type NATSClaims struct {
	Permissions *PermissionsClaims `json:"permissions"`
}

NATSClaims represent JWT invitation nats claims

type PRVDClaims

type PRVDClaims struct {
	Data        *DataClaims `json:"data"`
	Permissions uint32      `json:"permissions"`
}

PRVDClaims represent JWT invitation PRVD claims

type Participant

type Participant struct {
	Metadata          map[string]interface{} `sql:"-" json:"metadata,omitempty"`
	BPIEndpoint       *string                `sql:"-" json:"bpi_endpoint,omitempty"`
	MessagingEndpoint *string                `sql:"-" json:"messaging_endpoint,omitempty"`
	WebsocketEndpoint *string                `sql:"-" json:"websocket_endpoint,omitempty"`

	Address    *string      `json:"address"` // gorm:"column:participant"
	Workgroups []*Workgroup `sql:"-" json:"workgroups,omitempty"`
	Workflows  []*Workflow  `sql:"-" json:"workflows,omitempty"`
	Worksteps  []*Workstep  `sql:"-" json:"worksteps,omitempty"`
}

Participant is a party to a axiom workgroup or workflow context

func FetchWorkstepParticipants

func FetchWorkstepParticipants(token, workflowID, workstepID string, params map[string]interface{}) ([]*Participant, error)

FetchWorkstepParticipants returns the participants for a given workstep

type ParticipantsAPIResponse

type ParticipantsAPIResponse struct {
	ActionItemsCount   *uint64 `json:"action_items_count"`
	UsersCount         *uint64 `json:"users_count"`
	OrganizationsCount *uint64 `json:"organizations_count"`
}

ParticipantsAPIResponse is the participants item for inclusion in the `WorkgroupDashboardAPIResponse`

type PermissionsClaims

type PermissionsClaims struct {
	Publish   *PublishClaims   `json:"publish"`
	Subscribe *SubscribeClaims `json:"subscribe"`
}

NATSClaims represent JWT invitation nats permissions claims

type ProtocolMessage

type ProtocolMessage struct {
	AxiomID   *uuid.UUID              `sql:"-" json:"axiom_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"`
	Signature *string                 `sql:"-" json:"signature,omitempty"`
	Type      *string                 `sql:"-" json:"type,omitempty"`
	Payload   *ProtocolMessagePayload `sql:"-" json:"payload,omitempty"`

	WorkgroupID *uuid.UUID `sql:"-" json:"workgroup_id,omitempty"`
	WorkflowID  *uuid.UUID `sql:"-" json:"workgroup_id,omitempty"`
	WorkstepID  *uuid.UUID `sql:"-" json:"workstep_id,omitempty"`
	// contains filtered or unexported fields
}

ProtocolMessage is a axiom protocol message see https://github.com/ethereum-oasis/axiom/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 axiom protocol message payload

type PublicWorkgroupInvitationRequest

type PublicWorkgroupInvitationRequest struct {
	Email            *string `json:"email"`
	FirstName        *string `json:"first_name"`
	LastName         *string `json:"last_name"`
	OrganizationName *string `json:"organization_name"`
}

PublicWorkgroupInvitationRequest represents parameters for an anonymous request to a public workgroup

type PublishClaims

type PublishClaims struct {
	Allow []*string `json:"allow"`
}

PublishClaims represent JWT invitation nats publish permissions claims

type Schema

type Schema struct {
	Description *string       `json:"description"`
	Fields      []interface{} `json:"fields,omitempty"`
	Name        *string       `json:"name"`
	Type        *string       `json:"type"`
}

Schema is a schema from a connected sap system of record to create a mapping from

func GetSchemaDetails

func GetSchemaDetails(token, workgroupID, schemaID string, params map[string]interface{}) (*Schema, error)

GetSchemaDetails retrieves details for the given schema id

func ListSchemas

func ListSchemas(token, workgroupID string, params map[string]interface{}) ([]*Schema, error)

ListSchemas returns the schemas from a workgroup system of record

type Service

type Service struct {
	api.Client
}

Service for the axiom api

func InitAxiomService

func InitAxiomService(token string) *Service

InitAxiomService convenience method to initialize a `axiom.Service` instance

type SubjectAccount

type SubjectAccount struct {
	api.ModelWithDID
	SubjectID *string    `json:"subject_id"`
	Type      *string    `json:"type,omitempty"`
	VaultID   *uuid.UUID `json:"vault_id"`

	Credentials         *json.RawMessage `sql:"-" json:"credentials,omitempty"`
	CredentialsSecretID *uuid.UUID       `json:"credentials_secret_id,omitempty"`

	Metadata         *SubjectAccountMetadata `sql:"-" json:"metadata,omitempty"`
	MetadataSecretID *uuid.UUID              `json:"metadata_secret_id,omitempty"`

	RecoveryPolicy         *json.RawMessage `sql:"-" json:"recovery_policy,omitempty"`
	RecoveryPolicySecretID *uuid.UUID       `json:"recovery_policy_secret_id,omitempty"`

	Role         *json.RawMessage `sql:"-" json:"role,omitempty"`
	RoleSecretID *uuid.UUID       `json:"role_secret_id,omitempty"`

	SecurityPolicies         *json.RawMessage `sql:"-" json:"security_policies,omitempty"`
	SecurityPoliciesSecretID *uuid.UUID       `json:"security_policies_secret_id,omitempty"`

	RefreshToken *string `json:"-"` // encrypted, hex-encoded refresh token for the BPI subject account
	// contains filtered or unexported fields
}

SubjectAccount is a axiom BPI Subject Account per the specification

func CreateSubjectAccount

func CreateSubjectAccount(token, organizationID string, params map[string]interface{}) (*SubjectAccount, error)

CreateSubjectAccount creates a BPI subject account using the given organization and params

func GetSubjectAccountDetails

func GetSubjectAccountDetails(token, organizationID, subjectAccountID string, params map[string]interface{}) (*SubjectAccount, error)

GetSubjectAccountDetails retrieves details for the given BPI subject account id

func ListSubjectAccounts

func ListSubjectAccounts(token, organizationID string, params map[string]interface{}) ([]*SubjectAccount, error)

ListSubjectAccounts lists BPI subject accounts using the given organization and params

type SubjectAccountMetadata

type SubjectAccountMetadata struct {
	// Counterparties are the default counterparties
	Counterparties []*Participant `sql:"-" json:"counterparties,omitempty"`

	// NetworkID is the axiom network id
	NetworkID *string `json:"network_id,omitempty"`

	// OrganizationAddress is the axiom organization address
	OrganizationAddress *string `json:"organization_address,omitempty"`

	// OrganizationDomain is the axiom organization domain
	OrganizationDomain *string `json:"organization_domain,omitempty"`

	// OrganizationID is the id of the org
	OrganizationID *string `json:"organization_id,omitempty"`

	// OrganizationMessagingEndpoint is the public organziation messaging endpoint
	OrganizationMessagingEndpoint *string `json:"organization_messaging_endpoint,omitempty"`

	// OrganizationProxyEndpoint is the configured endpoint for the axiom proxy REST API
	OrganizationProxyEndpoint *string `json:"organization_proxy_endpoint,omitempty"`

	// OrganizationRefreshToken is the refresh token for the org
	OrganizationRefreshToken *string `json:"organization_refresh_token,omitempty"`

	// OrganizationWebsocketEndpoint is the configured endpoint for the axiom websocket
	OrganizationWebsocketEndpoint *string `json:"organization_websocket_endpoint,omitempty"`

	// RegistryContractAddress is a contract address
	RegistryContractAddress *string `json:"registry_contract_address,omitempty"`

	// RegistryContract is a compiled contract artifact
	RegistryContract *nchain.CompiledArtifact `sql:"-" json:"-"`

	// SOR contains one or more systems of record configurations
	SOR map[string]interface{} `json:"sor,omitempty"`

	// WorkgroupID is the id of the workgroup
	WorkgroupID *string `json:"workgroup_id,omitempty"`

	// Vault is the vault instance
	Vault *vault.Vault `sql:"-" json:"-"`
}

SubjectAccountMetadata is `SubjectAccount` metadata specific to this BPI instance

type SubscribeClaims

type SubscribeClaims struct {
	Allow []*string `json:"allow"`
}

SubscribeClaims represent JWT invitation nats subscribe permissions claims

type System

type System struct {
	api.Model

	Name           *string    `sql:"not null" json:"name"`
	Description    *string    `json:"description"`
	Type           *string    `sql:"not null" json:"type"`
	OrganizationID *uuid.UUID `sql:"not null" json:"organization_id"`
	WorkgroupID    *uuid.UUID `sql:"not null" json:"workgroup_id"`

	Auth        *SystemAuth       `sql:"-" json:"auth,omitempty"`
	EndpointURL *string           `sql:"-" json:"endpoint_url"`
	Middleware  *SystemMiddleware `sql:"-" json:"middleware,omitempty"`

	VaultID  *uuid.UUID `sql:"not null" json:"-"`
	SecretID *uuid.UUID `sql:"not null" json:"-"`
}

System is a persistent representation and instance of a functional `middleware.System` implementation that uses a vault secret to securely store the configuration

func CreateSystem

func CreateSystem(token, workgroupID string, params map[string]interface{}) (*System, error)

CreateSystem initializes a new system of record on the local axiom stack

func GetSystemDetails

func GetSystemDetails(token, workgroupID, systemID string, params map[string]interface{}) (*System, error)

GetSystemDetails returns the system details for a workgroup

func ListSystems

func ListSystems(token, workgroupID string, params map[string]interface{}) ([]*System, error)

ListSystems returns the systems for a workgroup

type SystemAuth

type SystemAuth struct {
	Method   *string `json:"name"`
	Username *string `json:"username"`
	Password *string `json:"password,omitempty"`

	RequireClientCredentials bool    `json:"require_client_credentials"`
	ClientID                 *string `json:"client_id"`
	ClientSecret             *string `json:"client_secret"`
}

SystemAuth defines authn/authz params

type SystemMiddleware

type SystemMiddleware struct {
	Inbound  *SystemMiddlewarePolicy `json:"inbound,omitempty"`
	Outbound *SystemMiddlewarePolicy `json:"outbound,omitempty"`
}

SystemMiddleware defines middleware for inbound and outbound middleware

type SystemMiddlewarePolicy

type SystemMiddlewarePolicy struct {
	Auth *SystemAuth `json:"auth"`
	Name *string     `json:"name"`
	URL  *string     `json:"url"`
}

SystemMiddleware defines middleware for inbound and outbound middleware

type TreeAnalyticsAPIResponse

type TreeAnalyticsAPIResponse struct {
	StartAt *time.Time `json:"start_at"`
	EndAt   *time.Time `json:"end_at"`

	Items    []*TreeAnalyticsAPIResponseItem `json:"items"`
	Metadata *json.RawMessage                `json:"metadata,omitempty"`
}

TreeAnalyticsAPIResponse is the tree analtics time-series item for inclusion in the `AnalyticsAPIResponse`

type TreeAnalyticsAPIResponseItem

type TreeAnalyticsAPIResponseItem struct {
	Date     *time.Time       `json:"date"`
	Metadata *json.RawMessage `json:"metadata,omitempty"`
	Size     uint64           `json:"size"` // in bytes
	Subtitle *string          `json:"subtitle"`
	Title    *string          `json:"title"`
}

TreeAnalyticsAPIResponseItem is the tree analtics time-series item for inclusion in the `AnalyticsAPIResponse`

type Workflow

type Workflow struct {
	api.Model
	DeployedAt *time.Time       `json:"deployed_at"`
	Metadata   *json.RawMessage `sql:"type:json not null" json:"metadata,omitempty"`
	Shield     *string          `json:"shield,omitempty"`
	Status     *string          `json:"status"`
	Version    *string          `json:"version"`

	Name           *string        `json:"name"`
	Description    *string        `json:"description"`
	UpdatedAt      *time.Time     `json:"updated_at"`
	Participants   []*Participant `sql:"-" json:"participants,omitempty"`
	WorkgroupID    *uuid.UUID     `json:"workgroup_id"`
	WorkflowID     *uuid.UUID     `json:"workflow_id"` // when nil, indicates the workflow is a prototype (not an instance)
	Worksteps      []*Workstep    `json:"worksteps,omitempty"`
	WorkstepsCount int            `json:"worksteps_count,omitempty"`
}

Workflow is a axiom workflow prototype

func CreateWorkflow

func CreateWorkflow(token string, params map[string]interface{}) (*Workflow, error)

CreateWorkflow initializes a new workflow on the local axiom stack

func DeployWorkflow

func DeployWorkflow(token, workflowID string, params map[string]interface{}) (*Workflow, error)

DeployWorkflow deploys a workflow to the specified layer(s), preventing future changes

func FetchWorkflowVersions

func FetchWorkflowVersions(token, workflowID string, params map[string]interface{}) ([]*Workflow, error)

FetchWorkflowVersions returns all of the versions of a given workflow

func GetWorkflowDetails

func GetWorkflowDetails(token, workflowID string, params map[string]interface{}) (*Workflow, error)

GetWorkflowDetails retrieves details for the given workflow id

func ListWorkflows

func ListWorkflows(token string, params map[string]interface{}) ([]*Workflow, error)

ListWorkflows retrieves a paginated list of axiom workflows scoped to the given API token

func VersionWorkflow

func VersionWorkflow(token, workflowID string, params map[string]interface{}) (*Workflow, error)

VersionWorkflow creates a new version of a previously deployed workflow

type WorkflowInstance

type WorkflowInstance struct {
	Workflow
	WorkflowID *uuid.UUID          `json:"workflow_id,omitempty"` // references the workflow prototype identifier
	Worksteps  []*WorkstepInstance `json:"worksteps,omitempty"`
}

WorkflowInstance is a axiom workflow instance

type WorkflowVersion

type WorkflowVersion struct {
	InitialWorkflowID uuid.UUID `json:"initial_workflow_id"`
	WorkflowID        uuid.UUID `json:"workflow_id"`
	Version           string    `json:"version"`
}

WorkflowVersion is a version of a workflow referenced by the initial workflow id

type WorkflowsAPIResponse

type WorkflowsAPIResponse struct {
	DelayedCount   *uint64 `json:"delayed_count"`
	DraftCount     *uint64 `json:"draft_count"`
	PublishedCount *uint64 `json:"published_count"`
}

WorkflowsAPIResponse is the workflows item for inclusion in the `WorkgroupDashboardAPIResponse`

type Workgroup

type Workgroup struct {
	api.Model
	Participants       []*Participant `sql:"-" json:"participants,omitempty"`
	Shield             *string        `json:"shield,omitempty"`
	Workflows          []*Workflow    `sql:"-" 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

	Name           *string     `json:"name"`
	Description    *string     `json:"description"`
	Config         interface{} `sql:"-" json:"config"`
	NetworkID      *uuid.UUID  `sql:"-" json:"network_id"`
	OrganizationID *uuid.UUID  `json:"-"`
}

Workgroup is a axiom workgroup context

func CreateWorkgroup

func CreateWorkgroup(token string, params map[string]interface{}) (*Workgroup, error)

CreateWorkgroup initializes a new or previously-joined workgroup on the local axiom stack

func GetWorkgroupDetails

func GetWorkgroupDetails(token, workgroupID string, params map[string]interface{}) (*Workgroup, error)

GetWorkgroupDetails retrieves details for the given workgroup id

func ListWorkgroups

func ListWorkgroups(token string, params map[string]interface{}) ([]*Workgroup, error)

ListWorkgroups retrieves a paginated list of axiom workgroups scoped to the given API token

type WorkgroupDashboardAPIResponse

type WorkgroupDashboardAPIResponse struct {
	Activity     []*ActivityAPIResponseItem `json:"activity"`
	Analytics    *AnalyticsAPIResponse      `json:"analytics"`
	Participants *ParticipantsAPIResponse   `json:"participants"`
	Workflows    *WorkflowsAPIResponse      `json:"workflows"`
}

WorkgroupDashboardAPIResponse is a general response containing data related to the current workgroup and organization context

func FetchWorkgroupAnalytics

func FetchWorkgroupAnalytics(token, workgroupID string, params map[string]interface{}) (*WorkgroupDashboardAPIResponse, error)

FetchWorkgroupAnalytics retrieves analytics data for the given workgroupID

type Workstep

type Workstep struct {
	api.Model
	Name            *string          `json:"name"`
	Cardinality     int              `json:"cardinality"`
	DeployedAt      *time.Time       `json:"deployed_at"`
	Metadata        *json.RawMessage `sql:"type:json not null" json:"metadata,omitempty"`
	Prover          *privacy.Prover  `json:"prover,omitempty"`
	ProverID        *uuid.UUID       `json:"prover_id"`
	Participants    []*Participant   `sql:"-" json:"participants,omitempty"`
	RequireFinality bool             `json:"require_finality"`
	Shield          *string          `json:"shield,omitempty"`
	Status          *string          `json:"status"`
	WorkflowID      *uuid.UUID       `json:"workflow_id,omitempty"`

	Description *string    `json:"description"`
	WorkstepID  *uuid.UUID `json:"workstep_id"` // when nil, indicates the workstep is a prototype (not an instance)
	// contains filtered or unexported fields
}

Workstep is a axiom workstep context

func CreateWorkstep

func CreateWorkstep(token, workflowID string, params map[string]interface{}) (*Workstep, error)

CreateWorkstep initializes a new workstep on the local axiom stack

func GetWorkstepDetails

func GetWorkstepDetails(token, workflowID, workstepID string, params map[string]interface{}) (*Workstep, error)

GetWorkstepDetails retrieves the details of a workstep

func ListWorksteps

func ListWorksteps(token, workflowID string, params map[string]interface{}) ([]*Workstep, error)

ListWorksteps retrieves a paginated list of axiom worksteps scoped to the given API token

type WorkstepInstance

type WorkstepInstance struct {
	Workstep
	WorkstepID *uuid.UUID `json:"workstep_id,omitempty"` // references the workstep prototype identifier
}

WorkstepInstance is a axiom workstep instance

Jump to

Keyboard shortcuts

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