platform

package
v1.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2018 License: BSD-2-Clause Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizeAs added in v1.27.0

type AuthorizeAs int
const (
	AuthorizeAsService AuthorizeAs = iota
	AuthorizeAsUser
)

type Client

type Client struct {
	*client.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *Config, authorizeAs AuthorizeAs) (*Client, error)

func (*Client) HTTPClient

func (c *Client) HTTPClient() *http.Client

func (*Client) IsAuthorizeAsService added in v1.27.0

func (c *Client) IsAuthorizeAsService() bool

func (*Client) Mutators added in v1.27.0

func (c *Client) Mutators(ctx context.Context) ([]request.RequestMutator, error)

func (*Client) RequestData added in v1.27.0

func (c *Client) RequestData(ctx context.Context, method string, url string, mutators []request.RequestMutator, requestBody interface{}, responseBody interface{}, inspectors ...request.ResponseInspector) error

func (*Client) RequestStream added in v1.27.0

func (c *Client) RequestStream(ctx context.Context, method string, url string, mutators []request.RequestMutator, requestBody interface{}, inspectors ...request.ResponseInspector) (io.ReadCloser, error)

type Config

type Config struct {
	*client.Config
	ServiceSecret string
}

func NewConfig

func NewConfig() *Config

func (*Config) Load

func (c *Config) Load(configReporter config.Reporter) error

type RestrictedTokenParameterMutator

type RestrictedTokenParameterMutator struct {
	*request.ParameterMutator
}

func NewRestrictedTokenParameterMutator

func NewRestrictedTokenParameterMutator(restrictedToken string) *RestrictedTokenParameterMutator

func (*RestrictedTokenParameterMutator) MutateRequest added in v1.27.0

func (r *RestrictedTokenParameterMutator) MutateRequest(req *http.Request) error

type ServiceSecretHeaderMutator

type ServiceSecretHeaderMutator struct {
	*request.HeaderMutator
}

func NewServiceSecretHeaderMutator

func NewServiceSecretHeaderMutator(serviceSecret string) *ServiceSecretHeaderMutator

func (*ServiceSecretHeaderMutator) MutateRequest added in v1.27.0

func (s *ServiceSecretHeaderMutator) MutateRequest(req *http.Request) error

type SessionTokenHeaderMutator

type SessionTokenHeaderMutator struct {
	*request.HeaderMutator
}

func NewSessionTokenHeaderMutator

func NewSessionTokenHeaderMutator(sessionToken string) *SessionTokenHeaderMutator

func (*SessionTokenHeaderMutator) MutateRequest added in v1.27.0

func (s *SessionTokenHeaderMutator) MutateRequest(req *http.Request) error

type TraceMutator

type TraceMutator struct {
	Context context.Context
}

func NewTraceMutator

func NewTraceMutator(ctx context.Context) *TraceMutator

func (*TraceMutator) MutateRequest added in v1.27.0

func (t *TraceMutator) MutateRequest(req *http.Request) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL