Documentation ¶
Index ¶
- Constants
- func RedactHeaders(header http.Header) http.Header
- func SanitizeJSON(raw []byte) ([]byte, error)
- type Config
- type NOAAHelper
- type RawClient
- type RawClientConfig
- type RequestLogger
- func (display *RequestLogger) DisplayBody([]byte) error
- func (display *RequestLogger) DisplayDump(dump string) error
- func (display *RequestLogger) DisplayHeader(name string, value string) error
- func (display *RequestLogger) DisplayHost(name string) error
- func (display *RequestLogger) DisplayJSONBody(body []byte) error
- func (display *RequestLogger) DisplayMessage(msg string) error
- func (display *RequestLogger) DisplayRequestHeader(method string, uri string, httpProtocol string) error
- func (display *RequestLogger) DisplayResponseHeader(httpProtocol string, status string) error
- func (display *RequestLogger) DisplayType(name string, requestDate time.Time) error
- func (display *RequestLogger) HandleInternalError(err error)
- func (display *RequestLogger) Start() error
- func (display *RequestLogger) Stop() error
- type RetryRequest
- type Session
- func (s *Session) ConfigStore() *configv3.Config
- func (s *Session) IsDebugMode() bool
- func (s *Session) NOAA() *noaaconsumer.Consumer
- func (s *Session) Networking() *cfnetv1.Client
- func (s *Session) Raw() *RawClient
- func (s *Session) TCPRouter() *router.Client
- func (s *Session) UAA() *uaa.Client
- func (s *Session) V2() *ccv2.Client
- func (s *Session) V3() *ccv3.Client
Constants ¶
const LogTimestampFormat = "2006-01-02T15:04:05.00-0700"
const RedactedValue = "[PRIVATE DATA HIDDEN]"
RedactedValue is the text that is displayed for redacted content. (eg authorization tokens, passwords, etc.)
Variables ¶
This section is empty.
Functions ¶
func SanitizeJSON ¶
Types ¶
type Config ¶
type Config struct { // Cloud foundry api endoint Endpoint string // cloud foundry user to call api (CFClientID can be set instead) User string // cloud foundry password to call api (CFClientID can be set instead) Password string // cloud foundry client id to call api or to identify user (User can be set in addition) // If empty and user set this value will be set as `cf` CFClientID string // cloud foundry client secret to call api or to identify user (user can be set in addition) CFClientSecret string // uaa client id to call uaa api UaaClientID string // uaa client secret to call uaa api UaaClientSecret string // Skip ssl verification SkipSslValidation bool // Show debug trace Debug bool }
config -
type NOAAHelper ¶
type NOAAHelper struct {
// contains filtered or unexported fields
}
func NewNOAAHelper ¶
func NewNOAAHelper(consumer *noaaconsumer.Consumer, configStore *configv3.Config) *NOAAHelper
func (NOAAHelper) RecentLogs ¶
func (c NOAAHelper) RecentLogs(appGUID string, maxMessages int) (string, error)
type RawClient ¶
type RawClient struct {
// contains filtered or unexported fields
}
Raw http client has uaa client authentication to make raw request with golang native api.
func NewRawClient ¶
func NewRawClient(config RawClientConfig, wrappers ...ccv3.ConnectionWrapper) *RawClient
NewRawClient -
func (RawClient) NewRequest ¶
NewRequest - Create a new request with setting api endpoint to the path
type RawClientConfig ¶
RawClientConfig - configuration for RawClient
type RequestLogger ¶
type RequestLogger struct {
// contains filtered or unexported fields
}
func NewRequestLogger ¶
func NewRequestLogger() *RequestLogger
func (*RequestLogger) DisplayBody ¶
func (display *RequestLogger) DisplayBody([]byte) error
func (*RequestLogger) DisplayDump ¶
func (display *RequestLogger) DisplayDump(dump string) error
func (*RequestLogger) DisplayHeader ¶
func (display *RequestLogger) DisplayHeader(name string, value string) error
func (*RequestLogger) DisplayHost ¶
func (display *RequestLogger) DisplayHost(name string) error
func (*RequestLogger) DisplayJSONBody ¶
func (display *RequestLogger) DisplayJSONBody(body []byte) error
func (*RequestLogger) DisplayMessage ¶
func (display *RequestLogger) DisplayMessage(msg string) error
func (*RequestLogger) DisplayRequestHeader ¶
func (display *RequestLogger) DisplayRequestHeader(method string, uri string, httpProtocol string) error
func (*RequestLogger) DisplayResponseHeader ¶
func (display *RequestLogger) DisplayResponseHeader(httpProtocol string, status string) error
func (*RequestLogger) DisplayType ¶
func (display *RequestLogger) DisplayType(name string, requestDate time.Time) error
func (*RequestLogger) HandleInternalError ¶
func (display *RequestLogger) HandleInternalError(err error)
func (*RequestLogger) Start ¶
func (display *RequestLogger) Start() error
func (*RequestLogger) Stop ¶
func (display *RequestLogger) Stop() error
type RetryRequest ¶
type RetryRequest struct {
// contains filtered or unexported fields
}
RetryRequest is a wrapper that retries failed requests if they contain a 5XX status code. copy of wrapper retry request in cli but remove the necessary of have a readseeker body (annoying for sending in fullstream)
func NewRetryRequest ¶
func NewRetryRequest(maxRetries int) *RetryRequest
NewRetryRequest returns a pointer to a RetryRequest wrapper.
func (*RetryRequest) Make ¶
func (retry *RetryRequest) Make(request *cloudcontroller.Request, passedResponse *cloudcontroller.Response) error
Make retries the request if it comes back with a 5XX status code.
func (*RetryRequest) Wrap ¶
func (retry *RetryRequest) Wrap(innerconnection cloudcontroller.Connection) cloudcontroller.Connection
Wrap sets the connection in the RetryRequest and returns itself.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session - wraps the available clients from CF cli
func (*Session) ConfigStore ¶
Give config store for client which need access token (e.g.: NOAA)
func (*Session) IsDebugMode ¶
func (*Session) NOAA ¶
func (s *Session) NOAA() *noaaconsumer.Consumer
Give access to logs api and metrics through noaa
func (*Session) Networking ¶
Give access to networking policy api