kinesis

package
v0.0.0-...-8018a7e Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package kinesis is a generated GoMock package.

Index

Constants

View Source
const GcpPartitionKey string = "partitionKey"
View Source
const GcpShardId string = "shard-0"
View Source
const GetRecordCountLimit int = 10000

Variables

This section is empty.

Functions

This section is empty.

Types

type GCPClient

type GCPClient interface {
	CreateSubscription(ctx context.Context, id string, cfg pubsub.SubscriptionConfig) (*pubsub.Subscription, error)
	Subscription(id string) *pubsub.Subscription
	Topic(id string) *pubsub.Topic
	CreateTopic(ctx context.Context, id string) (*pubsub.Topic, error)
	Close() error
}

type GCPPublishResult

type GCPPublishResult interface {
	Ready() <-chan struct{}
	Get(ctx context.Context) (serverID string, err error)
}

type GCPTopic

type GCPTopic interface {
	Delete(ctx context.Context) error
	Config(ctx context.Context) (pubsub.TopicConfig, error)
	Publish(ctx context.Context, msg *pubsub.Message) *pubsub.PublishResult
	Stop()
}

type Handler

type Handler struct {
	KinesisClient    *kinesis.Kinesis
	GCPClient        GCPClient
	GCPClientToTopic func(topic string, client GCPClient) GCPTopic
	GCPResultWrapper func(result *pubsub.PublishResult) GCPPublishResult
	GCPKMSClient     *kms.KeyManagementClient
	Context          *context.Context
	Config           *viper.Viper
}

func NewHandler

func NewHandler(config *viper.Viper) Handler

func (*Handler) GetConfig

func (handler *Handler) GetConfig() *viper.Viper

func (*Handler) GetContext

func (handler *Handler) GetContext() *context.Context

func (*Handler) GetGCPClient

func (handler *Handler) GetGCPClient() GCPClient

func (*Handler) GetKinesisClient

func (handler *Handler) GetKinesisClient() *kinesis.Kinesis

func (*Handler) SetConfig

func (handler *Handler) SetConfig(config *viper.Viper)

func (*Handler) SetContext

func (handler *Handler) SetContext(context *context.Context)

func (*Handler) SetGCPClient

func (handler *Handler) SetGCPClient(gcpClient GCPClient)

func (*Handler) SetKinesisClient

func (handler *Handler) SetKinesisClient(kinesisClient *kinesis.Kinesis)

func (*Handler) Shutdown

func (handler *Handler) Shutdown()

type HandlerInterface

type HandlerInterface interface {
	GetKinesisClient() *kinesis.Kinesis
	GetGCPClient() GCPClient
	GetContext() *context.Context
	GetConfig() *viper.Viper
	SetKinesisClient(kinesisClient *kinesis.Kinesis)
	SetGCPClient(gcpClient GCPClient)
	SetContext(context *context.Context)
	SetConfig(config *viper.Viper)
}

type Kinesis

type Kinesis interface {
	StartStreamEncryptionParseInput(r *http.Request) (*kinesis.StartStreamEncryptionInput, error)
	StartStreamEncryptionHandle(writer http.ResponseWriter, request *http.Request)
	GetRecordsParseInput(r *http.Request) (*kinesis.GetRecordsInput, error)
	GetRecordsHandle(writer http.ResponseWriter, request *http.Request)
	GetShardIteratorParseInput(r *http.Request) (*kinesis.GetShardIteratorInput, error)
	GetShardIteratorHandle(writer http.ResponseWriter, request *http.Request)
	DescribeParseInput(r *http.Request) (*kinesis.DescribeStreamInput, error)
	DescribeHandle(writer http.ResponseWriter, request *http.Request)
	PublishHandle(writer http.ResponseWriter, request *http.Request)
	PublishParseInput(r *http.Request) (*response_type.KinesisRequest, error)
	CreateStreamHandle(writer http.ResponseWriter, request *http.Request)
	CreateStreamParseInput(r *http.Request) (*kinesis.CreateStreamInput, error)
	DeleteStreamHandle(writer http.ResponseWriter, request *http.Request)
	DeleteStreamParseInput(r *http.Request) (*kinesis.DeleteStreamInput, error)
	Register(mux *mux.Router)
	Handle(writer http.ResponseWriter, request *http.Request)
	New(handler *Handler) *KinesisHandler
}

type KinesisHandler

type KinesisHandler struct {
	*Handler
}

func New

func New(handler *Handler) *KinesisHandler

func (*KinesisHandler) CreateStreamHandle

func (handler *KinesisHandler) CreateStreamHandle(writer http.ResponseWriter, request *http.Request)

func (*KinesisHandler) CreateStreamParseInput

func (handler *KinesisHandler) CreateStreamParseInput(r *http.Request) (*kinesis.CreateStreamInput, error)

func (*KinesisHandler) DeleteStreamHandle

func (handler *KinesisHandler) DeleteStreamHandle(writer http.ResponseWriter, request *http.Request)

func (*KinesisHandler) DeleteStreamParseInput

func (handler *KinesisHandler) DeleteStreamParseInput(r *http.Request) (*kinesis.DeleteStreamInput, error)

func (*KinesisHandler) DescribeHandle

func (handler *KinesisHandler) DescribeHandle(writer http.ResponseWriter, request *http.Request)

func (*KinesisHandler) DescribeParseInput

func (handler *KinesisHandler) DescribeParseInput(r *http.Request) (*kinesis.DescribeStreamInput, error)

func (*KinesisHandler) GetRecordsHandle

func (handler *KinesisHandler) GetRecordsHandle(writer http.ResponseWriter, request *http.Request)

func (*KinesisHandler) GetRecordsParseInput

func (handler *KinesisHandler) GetRecordsParseInput(r *http.Request) (*kinesis.GetRecordsInput, error)

func (*KinesisHandler) GetShardIteratorHandle

func (handler *KinesisHandler) GetShardIteratorHandle(writer http.ResponseWriter, request *http.Request)

func (*KinesisHandler) GetShardIteratorParseInput

func (handler *KinesisHandler) GetShardIteratorParseInput(r *http.Request) (*kinesis.GetShardIteratorInput, error)

func (*KinesisHandler) Handle

func (handler *KinesisHandler) Handle(writer http.ResponseWriter, request *http.Request)

func (*KinesisHandler) PublishHandle

func (handler *KinesisHandler) PublishHandle(writer http.ResponseWriter, request *http.Request)

func (*KinesisHandler) PublishParseInput

func (handler *KinesisHandler) PublishParseInput(r *http.Request) (*response_type.KinesisRequest, error)

func (*KinesisHandler) Register

func (handler *KinesisHandler) Register(mux *mux.Router)

func (*KinesisHandler) StartStreamEncryptionHandle

func (handler *KinesisHandler) StartStreamEncryptionHandle(writer http.ResponseWriter, request *http.Request)

func (*KinesisHandler) StartStreamEncryptionParseInput

func (handler *KinesisHandler) StartStreamEncryptionParseInput(r *http.Request) (*kinesis.StartStreamEncryptionInput, error)

type MockGCPClient

type MockGCPClient struct {
	// contains filtered or unexported fields
}

MockGCPClient is a mock of GCPClient interface

func NewMockGCPClient

func NewMockGCPClient(ctrl *gomock.Controller) *MockGCPClient

NewMockGCPClient creates a new mock instance

func (*MockGCPClient) Close

func (m *MockGCPClient) Close() error

Close mocks base method

func (*MockGCPClient) CreateSubscription

func (m *MockGCPClient) CreateSubscription(arg0 context.Context, arg1 string, arg2 pubsub.SubscriptionConfig) (*pubsub.Subscription, error)

CreateSubscription mocks base method

func (*MockGCPClient) CreateTopic

func (m *MockGCPClient) CreateTopic(arg0 context.Context, arg1 string) (*pubsub.Topic, error)

CreateTopic mocks base method

func (*MockGCPClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockGCPClient) Subscription

func (m *MockGCPClient) Subscription(arg0 string) *pubsub.Subscription

Subscription mocks base method

func (*MockGCPClient) Topic

func (m *MockGCPClient) Topic(arg0 string) *pubsub.Topic

Topic mocks base method

type MockGCPClientMockRecorder

type MockGCPClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockGCPClientMockRecorder is the mock recorder for MockGCPClient

func (*MockGCPClientMockRecorder) Close

func (mr *MockGCPClientMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockGCPClientMockRecorder) CreateSubscription

func (mr *MockGCPClientMockRecorder) CreateSubscription(arg0, arg1, arg2 interface{}) *gomock.Call

CreateSubscription indicates an expected call of CreateSubscription

func (*MockGCPClientMockRecorder) CreateTopic

func (mr *MockGCPClientMockRecorder) CreateTopic(arg0, arg1 interface{}) *gomock.Call

CreateTopic indicates an expected call of CreateTopic

func (*MockGCPClientMockRecorder) Subscription

func (mr *MockGCPClientMockRecorder) Subscription(arg0 interface{}) *gomock.Call

Subscription indicates an expected call of Subscription

func (*MockGCPClientMockRecorder) Topic

func (mr *MockGCPClientMockRecorder) Topic(arg0 interface{}) *gomock.Call

Topic indicates an expected call of Topic

type MockGCPPublishResult

type MockGCPPublishResult struct {
	// contains filtered or unexported fields
}

MockGCPPublishResult is a mock of GCPPublishResult interface

func NewMockGCPPublishResult

func NewMockGCPPublishResult(ctrl *gomock.Controller) *MockGCPPublishResult

NewMockGCPPublishResult creates a new mock instance

func (*MockGCPPublishResult) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockGCPPublishResult) Get

Get mocks base method

func (*MockGCPPublishResult) Ready

func (m *MockGCPPublishResult) Ready() <-chan struct{}

Ready mocks base method

type MockGCPPublishResultMockRecorder

type MockGCPPublishResultMockRecorder struct {
	// contains filtered or unexported fields
}

MockGCPPublishResultMockRecorder is the mock recorder for MockGCPPublishResult

func (*MockGCPPublishResultMockRecorder) Get

func (mr *MockGCPPublishResultMockRecorder) Get(arg0 interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockGCPPublishResultMockRecorder) Ready

Ready indicates an expected call of Ready

type MockGCPTopic

type MockGCPTopic struct {
	// contains filtered or unexported fields
}

MockGCPTopic is a mock of GCPTopic interface

func NewMockGCPTopic

func NewMockGCPTopic(ctrl *gomock.Controller) *MockGCPTopic

NewMockGCPTopic creates a new mock instance

func (*MockGCPTopic) Config

func (m *MockGCPTopic) Config(arg0 context.Context) (pubsub.TopicConfig, error)

Config mocks base method

func (*MockGCPTopic) Delete

func (m *MockGCPTopic) Delete(arg0 context.Context) error

Delete mocks base method

func (*MockGCPTopic) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockGCPTopic) Publish

func (m *MockGCPTopic) Publish(arg0 context.Context, arg1 *pubsub.Message) *pubsub.PublishResult

Publish mocks base method

func (*MockGCPTopic) Stop

func (m *MockGCPTopic) Stop()

Stop mocks base method

type MockGCPTopicMockRecorder

type MockGCPTopicMockRecorder struct {
	// contains filtered or unexported fields
}

MockGCPTopicMockRecorder is the mock recorder for MockGCPTopic

func (*MockGCPTopicMockRecorder) Config

func (mr *MockGCPTopicMockRecorder) Config(arg0 interface{}) *gomock.Call

Config indicates an expected call of Config

func (*MockGCPTopicMockRecorder) Delete

func (mr *MockGCPTopicMockRecorder) Delete(arg0 interface{}) *gomock.Call

Delete indicates an expected call of Delete

func (*MockGCPTopicMockRecorder) Publish

func (mr *MockGCPTopicMockRecorder) Publish(arg0, arg1 interface{}) *gomock.Call

Publish indicates an expected call of Publish

func (*MockGCPTopicMockRecorder) Stop

func (mr *MockGCPTopicMockRecorder) Stop() *gomock.Call

Stop indicates an expected call of Stop

Jump to

Keyboard shortcuts

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