Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Account = &cobra.Command{ Use: "account", Short: "tools to manage network accounts", Long: `A set of commands to support the management of accounts.`, Run: func(cmd *cobra.Command, args []string) { cmd.HelpFunc()(cmd, args) }, }
View Source
var Assets = &cobra.Command{ Use: "assets", Short: "", Long: ``, Run: func(cmd *cobra.Command, args []string) { const url = "https://api.pinata.cloud/data/testAuthentication" client := &http.Client{} req, err := http.NewRequest("GET", url, nil) if err != nil { fmt.Fprintln(os.Stderr, "error: "+err.Error()) os.Exit(1) } req.Header.Set("pinata_api_key", viper.GetString("PINATA_KEY")) req.Header.Set("pinata_secret_api_key", viper.GetString("PINATA_SEC")) res, err := client.Do(req) if err != nil { fmt.Fprintln(os.Stderr, "error: "+err.Error()) os.Exit(1) } body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Fprintln(os.Stderr, "error: "+err.Error()) os.Exit(1) } msg := PinTestResponse{} if err := json.Unmarshal(body, &msg); nil != err { fmt.Fprintln(os.Stderr, "error: "+err.Error()) os.Exit(1) } fmt.Printf(":: Testing Pinata api keys on %s \n", url) fmt.Printf(">> Response: %s \n\n", msg.Message) cmd.HelpFunc()(cmd, args) }, }
Functions ¶
This section is empty.
Types ¶
type Arc3App ¶
type Arc3App struct { App string `json:"app"` Name string `json:"name"` UnitMax string `json:"unitmax"` UnitName string `json:"unitname"` Image string `json:"image"` Image_integrity string `json:"image_integrity"` Image_mimetype string `json:"image_mimetype"` }
Arc3App ASA Metadata Info (SA042-ASA)
type Arc3Asset ¶
type Arc3Asset struct { Name string `json:"name"` UnitName string `json:"unitname"` Image string `json:"image"` Image_integrity string `json:"image_integrity"` Image_mimetype string `json:"image_mimetype"` Properties SAAsset `json:"properties"` }
Arc3Asset ASA Metadata Info (SA076-ASA)
type PinFileResponse ¶
type PinTestResponse ¶
type PinTestResponse struct {
Message string `json:"message"`
}
type SAAsset ¶
type SAAsset struct { // Traits SATraits `json:"traits"` Collection SACollection `json:"collection"` }
SAAsset Asset Properies (SA101)
type SACollection ¶
type SACollection struct { ID string `json:"id"` Name string `json:"name"` Metadata string `json:"metadata"` }
SACollection ASA Collection (SA042)
Click to show internal directories.
Click to hide internal directories.