registry

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Utils

func Utils() utilsInterface

Types

type Account

type Account struct {
	Parent string `json:"parentName,omitempty"`
	Name   string `json:"name,omitempty"`
	Value  string `json:"-"`
}

Account ...

func (*Account) InvokeCreate

func (acct *Account) InvokeCreate(keystorePath string, signer string) error

InvokeCreate create an account tied to an existing org or group

func (*Account) InvokeGet

func (acct *Account) InvokeGet() error

InvokeGet retrieve an account

func (*Account) InvokeReverseLookup

func (acct *Account) InvokeReverseLookup() error

InvokeReverseLookup retrieve an account's details using Ethereum address

type ContractOrganization

type ContractOrganization struct {
	ID       string `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	Owner    string `json:"owner,omitempty"`
	ParentID string `json:"parent,omitempty"`
}

type Group

type Group struct {
	NodeID      string
	Owner       string
	Name        string
	Parent      string
	NumUsers    string
	NumChildren string
	Profile     string
}

Group represents a group

func (*Group) InvokeCreate

func (g *Group) InvokeCreate(keystorePath string, signer string) error

InvokeCreate create a node

func (*Group) InvokeGet

func (g *Group) InvokeGet() error

InvokeGet get a user

func (*Group) InvokeList

func (g *Group) InvokeList(node [32]byte) (*[]ContractOrganization, error)

InvokeList get a list of groups

type JSONWebSignature

type JSONWebSignature struct {
	Headers    []string `json:"headers"`
	Payload    string   `json:"payload"`
	Signatures []string `json:"signatures"`
}

JSONWebSignature json representation of JWS

type Organization

type Organization struct {
	Consortium     string `json:"consortia_id,omitempty"`
	Environment    string `json:"environment_id,omitempty"`
	MemberID       string `json:"membership_id,omitempty"`
	Name           string `json:"-"`
	Owner          string `json:"-"`
	SigningKeyFile string `json:"-"`
	CertPEMFile    string `json:"-"`
}

Organization ...

func (*Organization) InvokeCreate

func (org *Organization) InvokeCreate() (*VerifiedOrganization, error)

InvokeCreate registers a verified organization with the on-chain registry and stores the proof on-chain

func (*Organization) InvokeGet

func (org *Organization) InvokeGet() (*VerifiedOrganization, error)

InvokeGet retrieve an organization

func (*Organization) InvokeList

func (org *Organization) InvokeList() (*[]ContractOrganization, error)

InvokeList retrieve a list of registered top-level organizations

type Profile

type Profile struct {
	KeyStorePath string
	Signer       string
}

Profile object to interact with profile

func (*Profile) GetProperties

func (p *Profile) GetProperties(owner string) (*[]Property, error)

GetProperties get the latest revision of all properties associated with this owner

func (*Profile) GetProperty

func (p *Profile) GetProperty(owner string, key string) (*Property, error)

GetProperty get a property's latest revision

func (*Profile) GetPropertyAllVersions

func (p *Profile) GetPropertyAllVersions(owner string, key string) (*[]Property, error)

GetPropertyAllVersions all version for the given property

func (*Profile) GetPropertyByRevision

func (p *Profile) GetPropertyByRevision(owner string, key string, revisionIndex int64) (*Property, error)

GetPropertyByRevision as the name says

func (*Profile) SetProperty

func (p *Profile) SetProperty(key string, value string, revision string) error

SetProperty sets the key-value for the owner profile

type Property

type Property struct {
	Name    string `json:"name,omitempty"`
	Value   string `json:"value,omitempty"`
	Version string `json:"version,omitempty"`
}

Property key-value details

type ServiceDefinitionType

type ServiceDefinitionType struct {
	Consortium  string `json:"consortia_id,omitempty"`
	Environment string `json:"environment_id,omitempty"`
	MemberID    string `json:"membership_id,omitempty"`
}

type SignedRequest

type SignedRequest struct {
	Consortium   string           `json:"consortia_id,omitempty"`
	Environment  string           `json:"environment_id,omitempty"`
	MembershipID string           `json:"membership_id,omitempty"`
	JWS          JSONWebSignature `json:"jwsjs,omitempty"`
}

SignedRequest signed payload for identity creation of an org

type User

type User struct {
	Name     string `json:"name,omitempty"`
	ParentID string `json:"orgId,omitempty"`
	UserID   string `json:"userId,omitempty"`
	Owner    string `json:"owner,omitempty"`
}

User represents a user

func (*User) InvokeCreate

func (u *User) InvokeCreate(keystorePath string, signer string) error

InvokeCreate create a user

func (*User) InvokeGet

func (u *User) InvokeGet() (*User, error)

InvokeGet get a user

func (*User) InvokeList

func (u *User) InvokeList() (*[]User, error)

InvokeList get a list of users

type VerifiedOrganization

type VerifiedOrganization struct {
	ID       string            `json:"id,omitempty"`
	Name     string            `json:"name,omitempty"`
	Owner    string            `json:"owner,omitempty"`
	Proof    *JSONWebSignature `json:"proof,omitempty"`
	ParentID string            `json:"parent,omitempty"`
}

VerifiedOrganization ...

Jump to

Keyboard shortcuts

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