aws-sdk-go: github.com/aws/aws-sdk-go/awstesting/mock Index | Files

package mock

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

Index

Package Files

mock.go

Variables

var RSAPrivateKey = &rsa.PrivateKey{
    PublicKey: rsa.PublicKey{
        N:  fromBase10("" /* 619 byte string literal not displayed */),
        E:  3,
    },
    D:  fromBase10("" /* 618 byte string literal not displayed */),
    Primes: []*big.Int{
        fromBase10("" /* 311 byte string literal not displayed */),
        fromBase10("" /* 311 byte string literal not displayed */),
    },
}

RSAPrivateKey is used for testing functionality that requires some sort of private key. Taken from crypto/rsa/rsa_test.go

Credit to golang 1.11

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),
    }))
}()

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

func NewMockClient Uses

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

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

Package mock imports 8 packages (graph) and is imported by 33 packages. Updated 2018-09-12. Refresh now. Tools for package owners.