mock

package
v0.0.0-...-bcded96 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubClient

func NewGithubClient() github.Client

NewGithubClient ...

func NewMockService

func NewMockService() services.Service

NewMockService ...

Types

type GithubClient

type GithubClient struct {
	mock.Mock
}

GithubClient ...

func (*GithubClient) Do

func (g *GithubClient) Do(req *http.Request) (*http.Response, error)

Do ...

func (*GithubClient) GetStatus

func (g *GithubClient) GetStatus() bool

GetStatus returns whether or not the backing service is down or not

func (*GithubClient) HealthCheck

func (g *GithubClient) HealthCheck() (bool, github.GHError)

HealthCheck ...

func (*GithubClient) ListKeys

func (g *GithubClient) ListKeys(username string) ([]github.Key, github.GHError)

ListKeys ...

func (*GithubClient) SetCircuitBreaker

func (g *GithubClient) SetCircuitBreaker(breaker services.Breaker)

SetCircuitBreaker allows you to change the default circuit-breaker for the client

func (*GithubClient) SetRetryPolicy

func (g *GithubClient) SetRetryPolicy(policy services.RetryPolicy)

SetRetryPolicy allows you to change the default retry-policy for the client

func (*GithubClient) SetStatus

func (g *GithubClient) SetStatus(status bool)

SetStatus allows the client to specify if the backing service is down or not

func (*GithubClient) SetTransport

func (g *GithubClient) SetTransport(transport *http.Transport)

SetTransport allows you to change the default http-transport for the client

type KubernetesClient

type KubernetesClient struct{}

KubernetesClient ...

func (*KubernetesClient) CreateDeployment

func (m *KubernetesClient) CreateDeployment(config kubernetes.DeploymentConfig) error

CreateDeployment ...

type MockService

type MockService struct {
	RetryPolicy    services.RetryPolicy
	CircuitBreaker services.Breaker
	Client         *http.Client
	Status         services.Status
}

MockService ...

func (*MockService) Do

func (m *MockService) Do(req *http.Request) (*http.Response, error)

Do ...

func (*MockService) GetStatus

func (m *MockService) GetStatus() bool

GetStatus ...

func (*MockService) SetCircuitBreaker

func (m *MockService) SetCircuitBreaker(breaker services.Breaker)

SetCircuitBreaker ...

func (*MockService) SetRetryPolicy

func (m *MockService) SetRetryPolicy(policy services.RetryPolicy)

SetRetryPolicy ...

func (*MockService) SetStatus

func (m *MockService) SetStatus(status bool)

SetStatus ...

func (*MockService) SetTransport

func (m *MockService) SetTransport(transport *http.Transport)

SetTransport ...

type S3Client

type S3Client struct{}

S3Client ...

func (*S3Client) Upload

func (m *S3Client) Upload(bucket, path string) error

Upload ...

Jump to

Keyboard shortcuts

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