mock - ActiveState ActiveGo 1.8
...

Package mock

import "github.com/aws/aws-sdk-go/awstesting/mock"
Overview
Index

Overview ▾

Variables

Session is a mock session which is used to hit the mock server

var Session = func() *session.Session {

    server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
        w.WriteHeader(http.StatusOK)
    }))

    return session.Must(session.NewSession(&aws.Config{
        DisableSSL: aws.Bool(true),
        Endpoint:   aws.String(server.URL),
    }))
}()

func NewMockClient

func NewMockClient(cfgs ...*aws.Config) *client.Client

NewMockClient creates and initializes a client that will connect to the mock server