Documentation ¶
Index ¶
- Constants
- Variables
- func CacheSetPaths(paths Paths) error
- func CacheSetRelease(r *Release) error
- func CreateProfile(profileName string) error
- func DeleteProfile(profileName string) error
- func GetCacheFilename(u string) (string, error)
- func GetCacheFolder() (string, error)
- func GetCurrentProfileName() (string, error)
- func GetDaySinceEpoch() string
- func GetDefaultPangeaConfig() pangea.Config
- func GetLogger() *log.Logger
- func GetProfileTokenAndDomain(profile, service string) (string, string, error)
- func GetTokenAndDomain(service string) (string, string, error)
- func IndentedString(obj any) (string, error)
- func ListProfiles() ([]string, error)
- func LoadFromCache(u string) []byte
- func PrettyPrint(obj any)
- func ReadAsCSV(val string) ([]string, error)
- func ReadStdin() string
- func RemoveCacheFolder() error
- func RemoveCachedFileFromURL(url string) error
- func SaveDomain(profile, service, domain string) error
- func SaveToCache(u string, data []byte) error
- func SaveToken(profile, service, token string) error
- func SelectProfile(profileName string) error
- type CacheData
- type Components
- type ConfigFile
- type Content
- type Discriminator
- type OpenAPI
- type Path
- type PathPost
- type Paths
- type Profile
- type Properties
- type Property
- type Release
- type RequestBody
- type Response
- type Schema
- type Service
- type VersionAvailable
- type WorkspaceData
- type XPangeaUISchema
Constants ¶
View Source
const ApplicationJSON = "application/json"
View Source
const MultipartFormData = "multipart/form-data"
View Source
const (
Version = "v2.0.0"
)
Variables ¶
View Source
var ErrNoConfigFile = errors.New("pangea Token doesn't exist. Run `pangea login` to setup your CLI")
Functions ¶
func CacheSetPaths ¶
func CacheSetRelease ¶
func CreateProfile ¶
func DeleteProfile ¶
func GetCacheFilename ¶
func GetCacheFolder ¶
func GetCurrentProfileName ¶
func GetDaySinceEpoch ¶
func GetDaySinceEpoch() string
func GetDefaultPangeaConfig ¶
func IndentedString ¶
func ListProfiles ¶
func LoadFromCache ¶
func PrettyPrint ¶
func PrettyPrint(obj any)
func RemoveCacheFolder ¶
func RemoveCacheFolder() error
func RemoveCachedFileFromURL ¶
func SaveDomain ¶
func SaveToCache ¶
func SelectProfile ¶
Types ¶
type CacheData ¶
type CacheData struct { Paths map[string]WorkspaceData `json:"paths"` VersionAvailable map[string]*Release `json:"version_available"` }
func LoadCacheData ¶
type Components ¶
type Components struct {
Schemas map[string]json.RawMessage `json:"schemas"`
}
type ConfigFile ¶
type ConfigFile struct { Title string `mapstructure:"title"` Version string `mapstructure:"version"` Profile string `mapstructure:"profile"` Profiles map[string]Profile `mapstructure:"profiles"` }
func (*ConfigFile) GetTokenAndDomain ¶
func (cf *ConfigFile) GetTokenAndDomain(profile, service string) (string, string, error)
func (*ConfigFile) SetDomain ¶
func (cf *ConfigFile) SetDomain(profile, service, domain string)
func (*ConfigFile) SetToken ¶
func (cf *ConfigFile) SetToken(profile, service, token string)
type Discriminator ¶
type OpenAPI ¶
type OpenAPI struct { Status *string Paths map[string]Path `json:"paths"` Components Components `json:"components"` // contains filtered or unexported fields }
type PathPost ¶
type PathPost struct { ID string `json:"operationId"` Summary string `json:"summary"` Description string `json:"description"` Tags []string `json:"tags"` RequestBody RequestBody `json:"requestBody"` Responses map[string]Response `json:"responses"` XPangeaUISchema *XPangeaUISchema `json:"x-pangea-ui-schema"` }
type Paths ¶
type Paths map[string]WorkspaceData
Key: path in lower case. Value: WorkspaceData
func CacheGetPaths ¶
type Profile ¶
func GetCurrentProfile ¶
type Properties ¶
type Release ¶
type Release struct { // Version is the version of the release Version string `json:"version"` // AssetURL is a URL to the uploaded file for the release AssetURL string `json:"asset_url"` // URL is a URL to release page for browsing URL string `json:"url"` // ReleaseNotes is a release notes of the release ReleaseNotes string `json:"release_notes"` // Name represents a name of the release Name string `json:"name"` // PublishedAt is the time when the release was published PublishedAt string `json:"published_at"` }
Release represents a release asset for current OS and arch.
func CacheGetRelease ¶
func NewRelease ¶
func NewRelease(r *selfupdate.Release) *Release
type RequestBody ¶
type RequestBody struct {
Content Content `json:"content"`
}
type Schema ¶
type Schema struct { Ref string `json:"$ref"` OneOf []Schema `json:"oneOf"` AnyOf []Schema `json:"anyOf"` Discriminator *Discriminator `json:"discriminator"` Title string `json:"title"` Description string `json:"description"` Required []string `json:"required"` Properties Properties `json:"properties"` }
type VersionAvailable ¶
Key: DaySinceEpoch. Value: Version available
type WorkspaceData ¶
type WorkspaceData struct {
Remote string `json:"remote"`
}
type XPangeaUISchema ¶
type XPangeaUISchema struct {
IsConfiguration *bool `json:"isConfiguration"`
}
Click to show internal directories.
Click to hide internal directories.