did

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DID = &cobra.Command{
		Use:     "did",
		Short:   "Work with DIDs",
		Long:    `Generate, view and list DIDs. Stores key material to the key-store.`,
		Example: "credwallet did",
		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()

			docs, err := storage.ListDIDs()
			if err != nil {
				fmt.Printf("Unable to list DIDs: %s\n", err.Error())
				return CmdErr(cmd, err)
			}
			fmt.Printf("<%d> DID Docs Found\n", len(docs))
			for _, doc := range docs {
				fmt.Println(doc.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