Documentation ¶
Overview ¶
Package hbr is a generated GoMock package.
Index ¶
- Constants
- type Client
- type Generator
- type HBRClient
- type HBRWrapper
- type LatestRelease
- type MockHBRClient
- func (m *MockHBRClient) CreateFormula(app, font string, private bool, release *LatestRelease) error
- func (m *MockHBRClient) EXPECT() *MockHBRClientMockRecorder
- func (m *MockHBRClient) GetCurrentRelease(repo string) (*LatestRelease, error)
- func (m *MockHBRClient) UpdateFormula(app, branch string, merge bool, release *LatestRelease) error
- type MockHBRClientMockRecorder
- type MockHBRWrapper
- func (m *MockHBRWrapper) CreateFormula(app, font string, private bool, release *LatestRelease)
- func (m *MockHBRWrapper) EXPECT() *MockHBRWrapperMockRecorder
- func (m *MockHBRWrapper) Err() error
- func (m *MockHBRWrapper) GetCurrentRelease(repo string) *LatestRelease
- func (m *MockHBRWrapper) UpdateFormula(app, branch string, merge bool, release *LatestRelease)
- type MockHBRWrapperMockRecorder
- func (mr *MockHBRWrapperMockRecorder) CreateFormula(app, font, private, release interface{}) *gomock.Call
- func (mr *MockHBRWrapperMockRecorder) Err() *gomock.Call
- func (mr *MockHBRWrapperMockRecorder) GetCurrentRelease(repo interface{}) *gomock.Call
- func (mr *MockHBRWrapperMockRecorder) UpdateFormula(app, branch, merge, release interface{}) *gomock.Call
- type Wrapper
Constants ¶
const ( CreateBranch = "master" MacRelease = "darwin_amd64" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client define functions for Homebrew Formula
func (*Client) CreateFormula ¶
func (g *Client) CreateFormula(app, font string, private bool, release *LatestRelease) error
func (*Client) GetCurrentRelease ¶
func (g *Client) GetCurrentRelease(repo string) (*LatestRelease, error)
GetCurrentRelease returns the latest release version and calculates its checksum
func (*Client) UpdateFormula ¶
func (g *Client) UpdateFormula(app, branch string, merge bool, release *LatestRelease) error
UpdateFormula updates the formula file to point to the latest release
type Generator ¶
type Generator func(token, owner string) HBRWrapper
Generator is a type for method to generate HBRWrapper
type HBRClient ¶
type HBRClient interface { GetCurrentRelease(repo string) (*LatestRelease, error) CreateFormula(app, font string, private bool, release *LatestRelease) error UpdateFormula(app, branch string, merge bool, release *LatestRelease) error }
HBRClient abstracts Client's interface
type HBRWrapper ¶
type HBRWrapper interface { GetCurrentRelease(repo string) *LatestRelease CreateFormula(app, font string, private bool, release *LatestRelease) UpdateFormula(app, branch string, merge bool, release *LatestRelease) Err() error }
HBRWrapper abstracts Wrapper's interface
func GenerateHBR ¶
func GenerateHBR(token, owner string) HBRWrapper
GenerateHBR defines a method to create HBRWrapper
type LatestRelease ¶
type LatestRelease struct {
// contains filtered or unexported fields
}
LatestRelease contains latest release info
type MockHBRClient ¶
type MockHBRClient struct {
// contains filtered or unexported fields
}
MockHBRClient is a mock of HBRClient interface
func NewMockHBRClient ¶
func NewMockHBRClient(ctrl *gomock.Controller) *MockHBRClient
NewMockHBRClient creates a new mock instance
func (*MockHBRClient) CreateFormula ¶
func (m *MockHBRClient) CreateFormula(app, font string, private bool, release *LatestRelease) error
CreateFormula mocks base method
func (*MockHBRClient) EXPECT ¶
func (m *MockHBRClient) EXPECT() *MockHBRClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockHBRClient) GetCurrentRelease ¶
func (m *MockHBRClient) GetCurrentRelease(repo string) (*LatestRelease, error)
GetCurrentRelease mocks base method
func (*MockHBRClient) UpdateFormula ¶
func (m *MockHBRClient) UpdateFormula(app, branch string, merge bool, release *LatestRelease) error
UpdateFormula mocks base method
type MockHBRClientMockRecorder ¶
type MockHBRClientMockRecorder struct {
// contains filtered or unexported fields
}
MockHBRClientMockRecorder is the mock recorder for MockHBRClient
func (*MockHBRClientMockRecorder) CreateFormula ¶
func (mr *MockHBRClientMockRecorder) CreateFormula(app, font, private, release interface{}) *gomock.Call
CreateFormula indicates an expected call of CreateFormula
func (*MockHBRClientMockRecorder) GetCurrentRelease ¶
func (mr *MockHBRClientMockRecorder) GetCurrentRelease(repo interface{}) *gomock.Call
GetCurrentRelease indicates an expected call of GetCurrentRelease
func (*MockHBRClientMockRecorder) UpdateFormula ¶
func (mr *MockHBRClientMockRecorder) UpdateFormula(app, branch, merge, release interface{}) *gomock.Call
UpdateFormula indicates an expected call of UpdateFormula
type MockHBRWrapper ¶
type MockHBRWrapper struct {
// contains filtered or unexported fields
}
MockHBRWrapper is a mock of HBRWrapper interface
func NewMockHBRWrapper ¶
func NewMockHBRWrapper(ctrl *gomock.Controller) *MockHBRWrapper
NewMockHBRWrapper creates a new mock instance
func (*MockHBRWrapper) CreateFormula ¶
func (m *MockHBRWrapper) CreateFormula(app, font string, private bool, release *LatestRelease)
CreateFormula mocks base method
func (*MockHBRWrapper) EXPECT ¶
func (m *MockHBRWrapper) EXPECT() *MockHBRWrapperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockHBRWrapper) GetCurrentRelease ¶
func (m *MockHBRWrapper) GetCurrentRelease(repo string) *LatestRelease
GetCurrentRelease mocks base method
func (*MockHBRWrapper) UpdateFormula ¶
func (m *MockHBRWrapper) UpdateFormula(app, branch string, merge bool, release *LatestRelease)
UpdateFormula mocks base method
type MockHBRWrapperMockRecorder ¶
type MockHBRWrapperMockRecorder struct {
// contains filtered or unexported fields
}
MockHBRWrapperMockRecorder is the mock recorder for MockHBRWrapper
func (*MockHBRWrapperMockRecorder) CreateFormula ¶
func (mr *MockHBRWrapperMockRecorder) CreateFormula(app, font, private, release interface{}) *gomock.Call
CreateFormula indicates an expected call of CreateFormula
func (*MockHBRWrapperMockRecorder) Err ¶
func (mr *MockHBRWrapperMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockHBRWrapperMockRecorder) GetCurrentRelease ¶
func (mr *MockHBRWrapperMockRecorder) GetCurrentRelease(repo interface{}) *gomock.Call
GetCurrentRelease indicates an expected call of GetCurrentRelease
func (*MockHBRWrapperMockRecorder) UpdateFormula ¶
func (mr *MockHBRWrapperMockRecorder) UpdateFormula(app, branch, merge, release interface{}) *gomock.Call
UpdateFormula indicates an expected call of UpdateFormula
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper wraps Client to avoid ugly error handling
func (*Wrapper) CreateFormula ¶
func (w *Wrapper) CreateFormula(app, font string, private bool, release *LatestRelease)
CreateFormula wraps client's CreateFormula method
func (*Wrapper) GetCurrentRelease ¶
func (w *Wrapper) GetCurrentRelease(repo string) *LatestRelease
GetCurrentRelease wraps client's GetCurrentRelease method
func (*Wrapper) UpdateFormula ¶
func (w *Wrapper) UpdateFormula(app, branch string, merge bool, release *LatestRelease)
UpdateFormula wraps client's UpdateFormula method