Documentation ¶
Index ¶
- Constants
- Variables
- func AgnosticRequest(a Auth, uri string, m string, b io.Reader) ([]byte, error)
- func BurnSecret(a Auth, b SecretBody) bool
- func CreateSecret(a Auth, b SecretBody, g bool)
- func GetMetadata(a Auth, b SecretBody)
- func GetRecent(a Auth, b SecretBody)
- func GetSecret(a Auth, b SecretBody) bool
- func GetStatus(a Auth) bool
- func Login(a Auth) bool
- type Auth
- type AuthYaml
- type BurnSecretResponse
- type ErrorResponse
- type History
- type Secret
- type SecretBody
- type Secrets
- type StatusRes
Constants ¶
View Source
const API_VERSION = "v1"
View Source
const BASE_URI = "https://onetimesecret.com/api"
View Source
const HOST = "https://onetimesecret.com"
Variables ¶
View Source
var ENDPOINTS = map[string]string{
"status": "status",
"share": "share",
"generate": "generate",
"getsecret": "secret",
"getmetadata": "private",
"burn": "private",
"getrecent": "private",
}
Functions ¶
func AgnosticRequest ¶
func BurnSecret ¶
func BurnSecret(a Auth, b SecretBody) bool
func CreateSecret ¶
func CreateSecret(a Auth, b SecretBody, g bool)
func GetMetadata ¶
func GetMetadata(a Auth, b SecretBody)
func GetRecent ¶
func GetRecent(a Auth, b SecretBody)
func GetSecret ¶
func GetSecret(a Auth, b SecretBody) bool
Types ¶
type BurnSecretResponse ¶
type BurnSecretResponse struct {
State Secret `json:"state"`
}
var BurnSecRes BurnSecretResponse
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
var ErrResponse ErrorResponse
type Secret ¶ added in v1.1.0
type Secret struct { Custid string `json:"custid"` MetadataKey string `json:"metadata_key"` SecretKey string `json:"secret_key"` Ttl int `json:"ttl"` MetadataTtl int `json:"metadata_ttl"` SecretTtl int `json:"secret_ttl"` Recipient []string `json:"recipient"` CreatedAt int `json:"created"` UpdatedAt int `json:"updated"` PassphraseRequired bool `json:"passphrase_required"` Value string `json:"value"` ReceivedAt int `json:"received"` State string `json:"state"` }
type SecretBody ¶
Click to show internal directories.
Click to hide internal directories.