Documentation ¶
Overview ¶
Example ¶
package main func main() { } // StubClient is a stub implementation of disadvantages.Client interface type StubClient struct{} // DoSomethingUseful implements disadvantages.Client func (s *StubClient) DoSomethingUseful() (bool, error) { return true, nil }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client is the exported API
func NewClient ¶
func NewClient(service DepService) Client
NewClient creates and initialises the client
type DepService ¶
type DepService interface {
DoSomethingElse()
}
type FetchRates ¶
type FetchRates struct{}
FetchRates rates from downstream service
func (*FetchRates) Fetch ¶
func (f *FetchRates) Fetch() ([]Rate, error)
type InnerService ¶
type InnerService struct {
// contains filtered or unexported fields
}
func NewInnerService ¶
func NewInnerService(innerDep Dependency) *InnerService
type OuterService ¶
type OuterService struct {
// contains filtered or unexported fields
}
func NewOuterService ¶
func NewOuterService(outerDep Dependency, innerDep Dependency) *OuterService
Click to show internal directories.
Click to hide internal directories.