presentation

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Pres = &cobra.Command{
		Use:     "presentation",
		Short:   "Generate, respond to, and verify presentation requests",
		Long:    `Generate, respond to, and verify presentation requests. Stores data to the key-store.`,
		Example: "credwallet presentation",
		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 err
			}
			defer storage.Close()

			requests, err := storage.ListPresentationRequests()
			if err != nil {
				fmt.Printf("Unable to read Presentation Requests: %s\n", err.Error())
				return CmdErr(cmd, err)
			}
			fmt.Printf("<%d> Presentation Request(s) Found\n", len(requests))
			for _, request := range requests {
				fmt.Println(request.ProofRequestInstanceID)
			}

			resps, err := storage.ListPresentationResponses()
			if err != nil {
				fmt.Printf("Unable to read Presentation Responses: %s\n", err.Error())
				return CmdErr(cmd, err)
			}
			fmt.Printf("<%d> Presentation Response(s) Found\n", len(resps))
			for _, resp := range resps {
				fmt.Println(resp.ProofRequestInstanceID)
			}
			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