config

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: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The gatekeeper's unique DID.
	DID string `json:"did"`

	// The gatekeeper's DID public key.
	PubKeyID string `json:"pubKeyID"`

	// The gatekeeper's DID private key.
	PrivateKey ed25519.PrivateKey `json:"privateKey"`

	// The CSH public key's keyID in the format of a DID URL.
	CSHPubKeyURL string `json:"cshPubKeyURL"`

	// The CSH profile created by gatekeeper.
	CSHProfileID string `json:"cshProfileID"`
}

Config contains configuration of Gatekeeper identity and csh profile.

type Service

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

Service responsible for creating and storing gatekeeper config.

func NewService

func NewService(params *ServiceParams) (*Service, error)

NewService returns a new instance of Service.

func (*Service) CreateConfig

func (s *Service) CreateConfig() error

CreateConfig creates gatekeeper DID, CSH profile, and store them in Config.

func (*Service) Get

func (s *Service) Get() (*Config, error)

Get returns stored config.

func (*Service) HasConfig

func (s *Service) HasConfig() (bool, error)

HasConfig checks if config is stored.

type ServiceParams

type ServiceParams struct {
	StoreProvider   storage.Provider
	CSHClient       cshClient
	VDR             vdrRegistry
	KeyManager      kms.KeyManager
	DidMethod       string
	DidAnchorOrigin string
}

ServiceParams contains parameters of config Service.

Jump to

Keyboard shortcuts

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