Documentation ¶
Index ¶
- type DescriptorReader
- type FakeStdin
- type TsuruClientHTTPTransport
- type TsuruContext
- func (c *TsuruContext) Client() *tsuru.APIClient
- func (c *TsuruContext) Config() *tsuru.Configuration
- func (tc *TsuruContext) DefaultHeaders() http.Header
- func (tc *TsuruContext) NewRequest(method string, url string, body io.Reader) (*http.Request, error)
- func (c *TsuruContext) RawHTTPClient() *http.Client
- func (tc *TsuruContext) SetTargetURL(value string)
- func (tc *TsuruContext) SetToken(value string)
- func (tc *TsuruContext) SetVerbosity(value int)
- func (tc *TsuruContext) TargetURL() string
- func (tc *TsuruContext) Token() string
- func (tc *TsuruContext) Verbosity() int
- type TsuruContextOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DescriptorReader ¶
type TsuruClientHTTPTransport ¶
type TsuruClientHTTPTransport struct {
// contains filtered or unexported fields
}
type TsuruContext ¶
type TsuruContext struct { TsuruContextOpts TokenSetFromFS bool }
func TsuruContextWithConfig ¶
func TsuruContextWithConfig(opts *TsuruContextOpts) *TsuruContext
TsuruContextWithConfig returns a new TsuruContext with the given configuration.
func (*TsuruContext) Client ¶
func (c *TsuruContext) Client() *tsuru.APIClient
Client is the tsuru client implementated by go-tsuruclient
func (*TsuruContext) Config ¶
func (c *TsuruContext) Config() *tsuru.Configuration
Config is the tsuru client configuration
func (*TsuruContext) DefaultHeaders ¶
func (tc *TsuruContext) DefaultHeaders() http.Header
func (*TsuruContext) NewRequest ¶
func (tc *TsuruContext) NewRequest(method string, url string, body io.Reader) (*http.Request, error)
NewRequest creates a new http.Request with the correct base path.
func (*TsuruContext) RawHTTPClient ¶
func (c *TsuruContext) RawHTTPClient() *http.Client
RawHTTPClient is the raw http client for REST calls
func (*TsuruContext) SetTargetURL ¶
func (tc *TsuruContext) SetTargetURL(value string)
func (*TsuruContext) SetToken ¶
func (tc *TsuruContext) SetToken(value string)
func (*TsuruContext) SetVerbosity ¶
func (tc *TsuruContext) SetVerbosity(value int)
func (*TsuruContext) TargetURL ¶
func (tc *TsuruContext) TargetURL() string
func (*TsuruContext) Token ¶
func (tc *TsuruContext) Token() string
func (*TsuruContext) Verbosity ¶
func (tc *TsuruContext) Verbosity() int
type TsuruContextOpts ¶
type TsuruContextOpts struct { // Verbosity is the verbosity level for tsuru client. Should be 1 ou 2 // InsecureSkipVerify will skip TLS verification (not applied to websockets) InsecureSkipVerify bool // LocalTZ is the local timezone LocalTZ *time.Location // AuthScheme is the protocol used for tsuru login. Overriden with TSURU_AUTH_SCHEME AuthScheme string // Executor is an instance of an interface for exec.Command() Executor exec.Executor // Fs is the filesystem used by the client Fs afero.Fs // Viper is an instance of the viper.Viper configuration Viper *viper.Viper UserAgent string Stdout io.Writer Stderr io.Writer Stdin DescriptorReader }
func DefaultTestingTsuruContextOptions ¶
func DefaultTestingTsuruContextOptions(vip *viper.Viper) *TsuruContextOpts
Click to show internal directories.
Click to hide internal directories.