Documentation
¶
Index ¶
- type Surge
- func (surge *Surge) Account() (types.Account, error)
- func (surge *Surge) GetEmailAndToken() (string, string)
- func (surge *Surge) List() (types.List, error)
- func (surge *Surge) Login(username, password string) (email string, err error)
- func (surge *Surge) Logout() (email string, err error)
- func (surge *Surge) SetEmailAndToken(email, token string)
- func (surge *Surge) SetHTTPClient(client *http.Client)
- func (surge *Surge) Teardown(domain string) (types.Teardown, error)
- func (surge *Surge) Upload(domain, src string, onEventStream func(byteLine []byte)) error
- func (surge *Surge) Whoami() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Surge ¶
type Surge struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Surge
new a Surge instance with default http client and automatically load email&token from `~/.netrc` if there is still no token, please call `surge.Login()` to login
func (*Surge) GetEmailAndToken ¶
func (*Surge) Login ¶
login and store email&token to `~/.netrc` just like what the official surge cli do if the username do not exists, surge.sh will create one for you :)
func (*Surge) SetEmailAndToken ¶
func (*Surge) SetHTTPClient ¶
change the default http client
Click to show internal directories.
Click to hide internal directories.