creddef

package
v0.0.0-...-eae8967 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CredDef = &cobra.Command{
		Use:     "creddef",
		Short:   "Work with Credential Definitions",
		Long:    `Generate, view and list Credential Definitions: the binding of a schema to an identity as a new identity.`,
		Example: "credwallet creddef",
		Args:    cobra.ExactArgs(0),
		RunE: func(cmd *cobra.Command, args []string) error {
			storage, err := bolt.NewStorage()
			if err != nil {
				fmt.Printf("Unable to initiate bolt storage: %s\n", err.Error())
				return CmdErr(cmd, err)
			}
			defer storage.Close()

			credDef, err := storage.ListCredDefs()
			if err != nil {
				fmt.Printf("Unable to list Cred Defs: %s\n", err.Error())
				return CmdErr(cmd, err)
			}

			fmt.Printf("<%d> Cred Def(s) Found\n", len(credDef))
			for _, doc := range credDef {
				fmt.Printf("%s - Schema: %s\n", doc.ID, doc.Service[0].ID)
			}
			return nil
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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