Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var API_BASE_URL string
View Source
var Cmd = &cobra.Command{ Use: "me", Short: "crawl ME API", Run: func(cmd *cobra.Command, args []string) { full, _ := cmd.Flags().GetBool("full") var ok bool API_BASE_URL, ok = os.LookupEnv("API_BASE_URL") if !ok { log.Fatalln("No API_BASE_URL") } SOLSCAN_PUBLIC_API_BASE_URL, ok = os.LookupEnv("SOLSCAN_PUBLIC_API_BASE_URL") if !ok { log.Fatalln("No PUBLIC_SOLSCAN_API_BASE_URL") } PGUSER, ok := os.LookupEnv("PGUSER") if !ok { log.Fatalln("No PGUSER") } PGPASSWORD, ok := os.LookupEnv("PGPASSWORD") if !ok { log.Fatalln("No PGPASSWORD") } PGHOST, ok := os.LookupEnv("PGHOST") if !ok { log.Fatalln("No PGHOST") } PGDATABASE, ok := os.LookupEnv("PGDATABASE") if !ok { log.Fatalln("No PGDATABASE") } connStr := fmt.Sprint( "postgres://", PGUSER, ":", PGPASSWORD, "@", PGHOST, "/", PGDATABASE, "?sslmode=require", ) var err error db, err = sql.Open("postgres", connStr) if err != nil { log.Fatalln(err) } execute(full) }, }
View Source
var SOLSCAN_PUBLIC_API_BASE_URL string
View Source
var UNLIMIT_PAGE = 0
Functions ¶
This section is empty.
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.