ivsrealtimeiface

package
v0.0.0-...-5458e1c Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ivsrealtimeiface provides an interface to enable mocking the Amazon Interactive Video Service RealTime service client for testing your code.

It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IVSRealTimeAPI

type IVSRealTimeAPI interface {
	CreateEncoderConfiguration(*ivsrealtime.CreateEncoderConfigurationInput) (*ivsrealtime.CreateEncoderConfigurationOutput, error)
	CreateEncoderConfigurationWithContext(aws.Context, *ivsrealtime.CreateEncoderConfigurationInput, ...request.Option) (*ivsrealtime.CreateEncoderConfigurationOutput, error)
	CreateEncoderConfigurationRequest(*ivsrealtime.CreateEncoderConfigurationInput) (*request.Request, *ivsrealtime.CreateEncoderConfigurationOutput)

	CreateParticipantToken(*ivsrealtime.CreateParticipantTokenInput) (*ivsrealtime.CreateParticipantTokenOutput, error)
	CreateParticipantTokenWithContext(aws.Context, *ivsrealtime.CreateParticipantTokenInput, ...request.Option) (*ivsrealtime.CreateParticipantTokenOutput, error)
	CreateParticipantTokenRequest(*ivsrealtime.CreateParticipantTokenInput) (*request.Request, *ivsrealtime.CreateParticipantTokenOutput)

	CreateStage(*ivsrealtime.CreateStageInput) (*ivsrealtime.CreateStageOutput, error)
	CreateStageWithContext(aws.Context, *ivsrealtime.CreateStageInput, ...request.Option) (*ivsrealtime.CreateStageOutput, error)
	CreateStageRequest(*ivsrealtime.CreateStageInput) (*request.Request, *ivsrealtime.CreateStageOutput)

	CreateStorageConfiguration(*ivsrealtime.CreateStorageConfigurationInput) (*ivsrealtime.CreateStorageConfigurationOutput, error)
	CreateStorageConfigurationWithContext(aws.Context, *ivsrealtime.CreateStorageConfigurationInput, ...request.Option) (*ivsrealtime.CreateStorageConfigurationOutput, error)
	CreateStorageConfigurationRequest(*ivsrealtime.CreateStorageConfigurationInput) (*request.Request, *ivsrealtime.CreateStorageConfigurationOutput)

	DeleteEncoderConfiguration(*ivsrealtime.DeleteEncoderConfigurationInput) (*ivsrealtime.DeleteEncoderConfigurationOutput, error)
	DeleteEncoderConfigurationWithContext(aws.Context, *ivsrealtime.DeleteEncoderConfigurationInput, ...request.Option) (*ivsrealtime.DeleteEncoderConfigurationOutput, error)
	DeleteEncoderConfigurationRequest(*ivsrealtime.DeleteEncoderConfigurationInput) (*request.Request, *ivsrealtime.DeleteEncoderConfigurationOutput)

	DeleteStage(*ivsrealtime.DeleteStageInput) (*ivsrealtime.DeleteStageOutput, error)
	DeleteStageWithContext(aws.Context, *ivsrealtime.DeleteStageInput, ...request.Option) (*ivsrealtime.DeleteStageOutput, error)
	DeleteStageRequest(*ivsrealtime.DeleteStageInput) (*request.Request, *ivsrealtime.DeleteStageOutput)

	DeleteStorageConfiguration(*ivsrealtime.DeleteStorageConfigurationInput) (*ivsrealtime.DeleteStorageConfigurationOutput, error)
	DeleteStorageConfigurationWithContext(aws.Context, *ivsrealtime.DeleteStorageConfigurationInput, ...request.Option) (*ivsrealtime.DeleteStorageConfigurationOutput, error)
	DeleteStorageConfigurationRequest(*ivsrealtime.DeleteStorageConfigurationInput) (*request.Request, *ivsrealtime.DeleteStorageConfigurationOutput)

	DisconnectParticipant(*ivsrealtime.DisconnectParticipantInput) (*ivsrealtime.DisconnectParticipantOutput, error)
	DisconnectParticipantWithContext(aws.Context, *ivsrealtime.DisconnectParticipantInput, ...request.Option) (*ivsrealtime.DisconnectParticipantOutput, error)
	DisconnectParticipantRequest(*ivsrealtime.DisconnectParticipantInput) (*request.Request, *ivsrealtime.DisconnectParticipantOutput)

	GetComposition(*ivsrealtime.GetCompositionInput) (*ivsrealtime.GetCompositionOutput, error)
	GetCompositionWithContext(aws.Context, *ivsrealtime.GetCompositionInput, ...request.Option) (*ivsrealtime.GetCompositionOutput, error)
	GetCompositionRequest(*ivsrealtime.GetCompositionInput) (*request.Request, *ivsrealtime.GetCompositionOutput)

	GetEncoderConfiguration(*ivsrealtime.GetEncoderConfigurationInput) (*ivsrealtime.GetEncoderConfigurationOutput, error)
	GetEncoderConfigurationWithContext(aws.Context, *ivsrealtime.GetEncoderConfigurationInput, ...request.Option) (*ivsrealtime.GetEncoderConfigurationOutput, error)
	GetEncoderConfigurationRequest(*ivsrealtime.GetEncoderConfigurationInput) (*request.Request, *ivsrealtime.GetEncoderConfigurationOutput)

	GetParticipant(*ivsrealtime.GetParticipantInput) (*ivsrealtime.GetParticipantOutput, error)
	GetParticipantWithContext(aws.Context, *ivsrealtime.GetParticipantInput, ...request.Option) (*ivsrealtime.GetParticipantOutput, error)
	GetParticipantRequest(*ivsrealtime.GetParticipantInput) (*request.Request, *ivsrealtime.GetParticipantOutput)

	GetStage(*ivsrealtime.GetStageInput) (*ivsrealtime.GetStageOutput, error)
	GetStageWithContext(aws.Context, *ivsrealtime.GetStageInput, ...request.Option) (*ivsrealtime.GetStageOutput, error)
	GetStageRequest(*ivsrealtime.GetStageInput) (*request.Request, *ivsrealtime.GetStageOutput)

	GetStageSession(*ivsrealtime.GetStageSessionInput) (*ivsrealtime.GetStageSessionOutput, error)
	GetStageSessionWithContext(aws.Context, *ivsrealtime.GetStageSessionInput, ...request.Option) (*ivsrealtime.GetStageSessionOutput, error)
	GetStageSessionRequest(*ivsrealtime.GetStageSessionInput) (*request.Request, *ivsrealtime.GetStageSessionOutput)

	GetStorageConfiguration(*ivsrealtime.GetStorageConfigurationInput) (*ivsrealtime.GetStorageConfigurationOutput, error)
	GetStorageConfigurationWithContext(aws.Context, *ivsrealtime.GetStorageConfigurationInput, ...request.Option) (*ivsrealtime.GetStorageConfigurationOutput, error)
	GetStorageConfigurationRequest(*ivsrealtime.GetStorageConfigurationInput) (*request.Request, *ivsrealtime.GetStorageConfigurationOutput)

	ListCompositions(*ivsrealtime.ListCompositionsInput) (*ivsrealtime.ListCompositionsOutput, error)
	ListCompositionsWithContext(aws.Context, *ivsrealtime.ListCompositionsInput, ...request.Option) (*ivsrealtime.ListCompositionsOutput, error)
	ListCompositionsRequest(*ivsrealtime.ListCompositionsInput) (*request.Request, *ivsrealtime.ListCompositionsOutput)

	ListCompositionsPages(*ivsrealtime.ListCompositionsInput, func(*ivsrealtime.ListCompositionsOutput, bool) bool) error
	ListCompositionsPagesWithContext(aws.Context, *ivsrealtime.ListCompositionsInput, func(*ivsrealtime.ListCompositionsOutput, bool) bool, ...request.Option) error

	ListEncoderConfigurations(*ivsrealtime.ListEncoderConfigurationsInput) (*ivsrealtime.ListEncoderConfigurationsOutput, error)
	ListEncoderConfigurationsWithContext(aws.Context, *ivsrealtime.ListEncoderConfigurationsInput, ...request.Option) (*ivsrealtime.ListEncoderConfigurationsOutput, error)
	ListEncoderConfigurationsRequest(*ivsrealtime.ListEncoderConfigurationsInput) (*request.Request, *ivsrealtime.ListEncoderConfigurationsOutput)

	ListEncoderConfigurationsPages(*ivsrealtime.ListEncoderConfigurationsInput, func(*ivsrealtime.ListEncoderConfigurationsOutput, bool) bool) error
	ListEncoderConfigurationsPagesWithContext(aws.Context, *ivsrealtime.ListEncoderConfigurationsInput, func(*ivsrealtime.ListEncoderConfigurationsOutput, bool) bool, ...request.Option) error

	ListParticipantEvents(*ivsrealtime.ListParticipantEventsInput) (*ivsrealtime.ListParticipantEventsOutput, error)
	ListParticipantEventsWithContext(aws.Context, *ivsrealtime.ListParticipantEventsInput, ...request.Option) (*ivsrealtime.ListParticipantEventsOutput, error)
	ListParticipantEventsRequest(*ivsrealtime.ListParticipantEventsInput) (*request.Request, *ivsrealtime.ListParticipantEventsOutput)

	ListParticipantEventsPages(*ivsrealtime.ListParticipantEventsInput, func(*ivsrealtime.ListParticipantEventsOutput, bool) bool) error
	ListParticipantEventsPagesWithContext(aws.Context, *ivsrealtime.ListParticipantEventsInput, func(*ivsrealtime.ListParticipantEventsOutput, bool) bool, ...request.Option) error

	ListParticipants(*ivsrealtime.ListParticipantsInput) (*ivsrealtime.ListParticipantsOutput, error)
	ListParticipantsWithContext(aws.Context, *ivsrealtime.ListParticipantsInput, ...request.Option) (*ivsrealtime.ListParticipantsOutput, error)
	ListParticipantsRequest(*ivsrealtime.ListParticipantsInput) (*request.Request, *ivsrealtime.ListParticipantsOutput)

	ListParticipantsPages(*ivsrealtime.ListParticipantsInput, func(*ivsrealtime.ListParticipantsOutput, bool) bool) error
	ListParticipantsPagesWithContext(aws.Context, *ivsrealtime.ListParticipantsInput, func(*ivsrealtime.ListParticipantsOutput, bool) bool, ...request.Option) error

	ListStageSessions(*ivsrealtime.ListStageSessionsInput) (*ivsrealtime.ListStageSessionsOutput, error)
	ListStageSessionsWithContext(aws.Context, *ivsrealtime.ListStageSessionsInput, ...request.Option) (*ivsrealtime.ListStageSessionsOutput, error)
	ListStageSessionsRequest(*ivsrealtime.ListStageSessionsInput) (*request.Request, *ivsrealtime.ListStageSessionsOutput)

	ListStageSessionsPages(*ivsrealtime.ListStageSessionsInput, func(*ivsrealtime.ListStageSessionsOutput, bool) bool) error
	ListStageSessionsPagesWithContext(aws.Context, *ivsrealtime.ListStageSessionsInput, func(*ivsrealtime.ListStageSessionsOutput, bool) bool, ...request.Option) error

	ListStages(*ivsrealtime.ListStagesInput) (*ivsrealtime.ListStagesOutput, error)
	ListStagesWithContext(aws.Context, *ivsrealtime.ListStagesInput, ...request.Option) (*ivsrealtime.ListStagesOutput, error)
	ListStagesRequest(*ivsrealtime.ListStagesInput) (*request.Request, *ivsrealtime.ListStagesOutput)

	ListStagesPages(*ivsrealtime.ListStagesInput, func(*ivsrealtime.ListStagesOutput, bool) bool) error
	ListStagesPagesWithContext(aws.Context, *ivsrealtime.ListStagesInput, func(*ivsrealtime.ListStagesOutput, bool) bool, ...request.Option) error

	ListStorageConfigurations(*ivsrealtime.ListStorageConfigurationsInput) (*ivsrealtime.ListStorageConfigurationsOutput, error)
	ListStorageConfigurationsWithContext(aws.Context, *ivsrealtime.ListStorageConfigurationsInput, ...request.Option) (*ivsrealtime.ListStorageConfigurationsOutput, error)
	ListStorageConfigurationsRequest(*ivsrealtime.ListStorageConfigurationsInput) (*request.Request, *ivsrealtime.ListStorageConfigurationsOutput)

	ListStorageConfigurationsPages(*ivsrealtime.ListStorageConfigurationsInput, func(*ivsrealtime.ListStorageConfigurationsOutput, bool) bool) error
	ListStorageConfigurationsPagesWithContext(aws.Context, *ivsrealtime.ListStorageConfigurationsInput, func(*ivsrealtime.ListStorageConfigurationsOutput, bool) bool, ...request.Option) error

	ListTagsForResource(*ivsrealtime.ListTagsForResourceInput) (*ivsrealtime.ListTagsForResourceOutput, error)
	ListTagsForResourceWithContext(aws.Context, *ivsrealtime.ListTagsForResourceInput, ...request.Option) (*ivsrealtime.ListTagsForResourceOutput, error)
	ListTagsForResourceRequest(*ivsrealtime.ListTagsForResourceInput) (*request.Request, *ivsrealtime.ListTagsForResourceOutput)

	StartComposition(*ivsrealtime.StartCompositionInput) (*ivsrealtime.StartCompositionOutput, error)
	StartCompositionWithContext(aws.Context, *ivsrealtime.StartCompositionInput, ...request.Option) (*ivsrealtime.StartCompositionOutput, error)
	StartCompositionRequest(*ivsrealtime.StartCompositionInput) (*request.Request, *ivsrealtime.StartCompositionOutput)

	StopComposition(*ivsrealtime.StopCompositionInput) (*ivsrealtime.StopCompositionOutput, error)
	StopCompositionWithContext(aws.Context, *ivsrealtime.StopCompositionInput, ...request.Option) (*ivsrealtime.StopCompositionOutput, error)
	StopCompositionRequest(*ivsrealtime.StopCompositionInput) (*request.Request, *ivsrealtime.StopCompositionOutput)

	TagResource(*ivsrealtime.TagResourceInput) (*ivsrealtime.TagResourceOutput, error)
	TagResourceWithContext(aws.Context, *ivsrealtime.TagResourceInput, ...request.Option) (*ivsrealtime.TagResourceOutput, error)
	TagResourceRequest(*ivsrealtime.TagResourceInput) (*request.Request, *ivsrealtime.TagResourceOutput)

	UntagResource(*ivsrealtime.UntagResourceInput) (*ivsrealtime.UntagResourceOutput, error)
	UntagResourceWithContext(aws.Context, *ivsrealtime.UntagResourceInput, ...request.Option) (*ivsrealtime.UntagResourceOutput, error)
	UntagResourceRequest(*ivsrealtime.UntagResourceInput) (*request.Request, *ivsrealtime.UntagResourceOutput)

	UpdateStage(*ivsrealtime.UpdateStageInput) (*ivsrealtime.UpdateStageOutput, error)
	UpdateStageWithContext(aws.Context, *ivsrealtime.UpdateStageInput, ...request.Option) (*ivsrealtime.UpdateStageOutput, error)
	UpdateStageRequest(*ivsrealtime.UpdateStageInput) (*request.Request, *ivsrealtime.UpdateStageOutput)
}

IVSRealTimeAPI provides an interface to enable mocking the ivsrealtime.IVSRealTime service client's API operation, paginators, and waiters. This make unit testing your code that calls out to the SDK's service client's calls easier.

The best way to use this interface is so the SDK's service client's calls can be stubbed out for unit testing your code with the SDK without needing to inject custom request handlers into the SDK's request pipeline.

// myFunc uses an SDK service client to make a request to
// Amazon Interactive Video Service RealTime.
func myFunc(svc ivsrealtimeiface.IVSRealTimeAPI) bool {
    // Make svc.CreateEncoderConfiguration request
}

func main() {
    sess := session.New()
    svc := ivsrealtime.New(sess)

    myFunc(svc)
}

In your _test.go file:

// Define a mock struct to be used in your unit tests of myFunc.
type mockIVSRealTimeClient struct {
    ivsrealtimeiface.IVSRealTimeAPI
}
func (m *mockIVSRealTimeClient) CreateEncoderConfiguration(input *ivsrealtime.CreateEncoderConfigurationInput) (*ivsrealtime.CreateEncoderConfigurationOutput, error) {
    // mock response/functionality
}

func TestMyFunc(t *testing.T) {
    // Setup Test
    mockSvc := &mockIVSRealTimeClient{}

    myfunc(mockSvc)

    // Verify myFunc's functionality
}

It is important to note that this interface will have breaking changes when the service model is updated and adds new API operations, paginators, and waiters. Its suggested to use the pattern above for testing, or using tooling to generate mocks to satisfy the interfaces.

Jump to

Keyboard shortcuts

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