Documentation ¶
Index ¶
- type DomainMappingBuilder
- func (b *DomainMappingBuilder) Build() *servingv1beta1.DomainMapping
- func (b *DomainMappingBuilder) Namespace(ns string) *DomainMappingBuilder
- func (b *DomainMappingBuilder) Reference(reference duckv1.KReference) *DomainMappingBuilder
- func (b *DomainMappingBuilder) TLS(cert string) *DomainMappingBuilder
- type DomainUpdateFunc
- type KnServingClient
- type MockKnServingClient
- func (c *MockKnServingClient) CreateDomainMapping(ctx context.Context, domainMapping *servingv1beta1.DomainMapping) error
- func (c *MockKnServingClient) DeleteDomainMapping(ctx context.Context, name string) error
- func (c *MockKnServingClient) GetDomainMapping(ctx context.Context, name string) (*servingv1beta1.DomainMapping, error)
- func (c *MockKnServingClient) ListDomainMappings(ctx context.Context) (*servingv1beta1.DomainMappingList, error)
- func (c *MockKnServingClient) Namespace() string
- func (c *MockKnServingClient) Recorder() *ServingRecorder
- func (c *MockKnServingClient) UpdateDomainMapping(ctx context.Context, domainMapping *servingv1beta1.DomainMapping) error
- func (cl *MockKnServingClient) UpdateDomainMappingWithRetry(ctx context.Context, name string, updateFunc DomainUpdateFunc, nrRetries int) error
- type ServingRecorder
- func (sr *ServingRecorder) CreateDomainMapping(domainMapping interface{}, err error)
- func (sr *ServingRecorder) DeleteDomainMapping(name string, err error)
- func (sr *ServingRecorder) GetDomainMapping(name interface{}, domainMapping *servingv1beta1.DomainMapping, err error)
- func (sr *ServingRecorder) ListDomainMappings(domainMappingList *servingv1beta1.DomainMappingList, err error)
- func (sr *ServingRecorder) UpdateDomainMapping(domainMapping interface{}, err error)
- func (sr *ServingRecorder) Validate()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DomainMappingBuilder ¶
type DomainMappingBuilder struct {
// contains filtered or unexported fields
}
DomainMappingBuilder is for building the domainMapping
func NewDomainMappingBuilder ¶
func NewDomainMappingBuilder(name string) *DomainMappingBuilder
NewDomainMappingBuilder for building domainMapping object
func (*DomainMappingBuilder) Build ¶
func (b *DomainMappingBuilder) Build() *servingv1beta1.DomainMapping
Build to return an instance of domainMapping object
func (*DomainMappingBuilder) Namespace ¶
func (b *DomainMappingBuilder) Namespace(ns string) *DomainMappingBuilder
Namespace for domainMapping builder
func (*DomainMappingBuilder) Reference ¶
func (b *DomainMappingBuilder) Reference(reference duckv1.KReference) *DomainMappingBuilder
Reference for domainMapping builder
func (*DomainMappingBuilder) TLS ¶
func (b *DomainMappingBuilder) TLS(cert string) *DomainMappingBuilder
TLS for domainMapping builder
type DomainUpdateFunc ¶
type DomainUpdateFunc func(origDomain *servingv1beta1.DomainMapping) (*servingv1beta1.DomainMapping, error)
type KnServingClient ¶
type KnServingClient interface { // Namespace in which this client is operating for Namespace() string // GetDomainMapping GetDomainMapping(ctx context.Context, name string) (*servingv1beta1.DomainMapping, error) // CreateDomainMapping CreateDomainMapping(ctx context.Context, domainMapping *servingv1beta1.DomainMapping) error // UpdateDomainMapping UpdateDomainMapping(ctx context.Context, domainMapping *servingv1beta1.DomainMapping) error // UpdateDomainMappingWithRetry UpdateDomainMappingWithRetry(ctx context.Context, name string, updateFunc DomainUpdateFunc, nrRetries int) error // DeleteDomainMapping DeleteDomainMapping(ctx context.Context, name string) error // ListDomainMappings ListDomainMappings(ctx context.Context) (*servingv1beta1.DomainMappingList, error) }
KnServingClient to work with Serving v1beta1 resources
func NewKnServingClient ¶
func NewKnServingClient(client clientv1beta1.ServingV1beta1Interface, namespace string) KnServingClient
NewKnServingClient create a new client facade for the provided namespace
type MockKnServingClient ¶
type MockKnServingClient struct {
// contains filtered or unexported fields
}
MockKnServingClient client mock
func NewMockKnServiceClient ¶
func NewMockKnServiceClient(t *testing.T, ns ...string) *MockKnServingClient
NewMockKnServiceClient returns a new mock instance which you need to record for
func (*MockKnServingClient) CreateDomainMapping ¶
func (c *MockKnServingClient) CreateDomainMapping(ctx context.Context, domainMapping *servingv1beta1.DomainMapping) error
CreateDomainMapping mock function
func (*MockKnServingClient) DeleteDomainMapping ¶
func (c *MockKnServingClient) DeleteDomainMapping(ctx context.Context, name string) error
DeleteDomainMapping mock function
func (*MockKnServingClient) GetDomainMapping ¶
func (c *MockKnServingClient) GetDomainMapping(ctx context.Context, name string) (*servingv1beta1.DomainMapping, error)
GetDomainMapping mock function
func (*MockKnServingClient) ListDomainMappings ¶
func (c *MockKnServingClient) ListDomainMappings(ctx context.Context) (*servingv1beta1.DomainMappingList, error)
ListDomainMappings mock function
func (*MockKnServingClient) Namespace ¶
func (c *MockKnServingClient) Namespace() string
Namespace of this client
func (*MockKnServingClient) Recorder ¶
func (c *MockKnServingClient) Recorder() *ServingRecorder
Recorder returns the record instance
func (*MockKnServingClient) UpdateDomainMapping ¶
func (c *MockKnServingClient) UpdateDomainMapping(ctx context.Context, domainMapping *servingv1beta1.DomainMapping) error
UpdateDomainMapping mock function
func (*MockKnServingClient) UpdateDomainMappingWithRetry ¶
func (cl *MockKnServingClient) UpdateDomainMappingWithRetry(ctx context.Context, name string, updateFunc DomainUpdateFunc, nrRetries int) error
type ServingRecorder ¶
type ServingRecorder struct {
// contains filtered or unexported fields
}
ServingRecorder recorder for service
func (*ServingRecorder) CreateDomainMapping ¶
func (sr *ServingRecorder) CreateDomainMapping(domainMapping interface{}, err error)
CreateDomainMapping recorder function
func (*ServingRecorder) DeleteDomainMapping ¶
func (sr *ServingRecorder) DeleteDomainMapping(name string, err error)
DeleteDomainMapping recorder function
func (*ServingRecorder) GetDomainMapping ¶
func (sr *ServingRecorder) GetDomainMapping(name interface{}, domainMapping *servingv1beta1.DomainMapping, err error)
GetDomainMapping mock function recorder
func (*ServingRecorder) ListDomainMappings ¶
func (sr *ServingRecorder) ListDomainMappings(domainMappingList *servingv1beta1.DomainMappingList, err error)
ListDomainMappings recorder function
func (*ServingRecorder) UpdateDomainMapping ¶
func (sr *ServingRecorder) UpdateDomainMapping(domainMapping interface{}, err error)
UpdateDomainMapping recorder function
func (*ServingRecorder) Validate ¶
func (sr *ServingRecorder) Validate()
Validate checks that every recorded method has been called