Documentation
¶
Index ¶
- func RunFederator(configPath string)
- func SetupHTTPServer(responder Responder)
- type APIModel
- type APIProject
- type APIProjectSearchRequest
- type APIProjectSearchResponse
- type APISetHubsRequest
- type APIUpdateConfigRequest
- type Config
- type FedAction
- type FedFindProject
- type FedGetModel
- type FedSetHubs
- type FedUpdateConfig
- type Federator
- type HTTPResponder
- func (hr *HTTPResponder) Error(w http.ResponseWriter, r *http.Request, err error, statusCode int)
- func (hr *HTTPResponder) FindProject(request APIProjectSearchRequest) *APIProjectSearchResponse
- func (hr *HTTPResponder) GetModel() *APIModel
- func (hr *HTTPResponder) NotFound(w http.ResponseWriter, r *http.Request)
- func (hr *HTTPResponder) SetHubs(hubs *APISetHubsRequest)
- func (hr *HTTPResponder) UpdateConfig(config *APIUpdateConfigRequest)
- type HubConfig
- type HubCreationResult
- type HubCreator
- type MockResponder
- func (mr *MockResponder) Error(w http.ResponseWriter, r *http.Request, err error, statusCode int)
- func (mr *MockResponder) FindProject(request APIProjectSearchRequest) *APIProjectSearchResponse
- func (mr *MockResponder) GetModel() *APIModel
- func (mr *MockResponder) NotFound(w http.ResponseWriter, r *http.Request)
- func (mr *MockResponder) SetHubs(hubs *APISetHubsRequest)
- func (mr *MockResponder) UpdateConfig(config *APIUpdateConfigRequest)
- type Responder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIProjectSearchRequest ¶
type APIProjectSearchRequest struct {
ProjectName string
}
APIProjectSearchRequest ...
type APIProjectSearchResponse ¶
type APIProjectSearchResponse struct {
// map of hubBaseURL to project
Projects map[string]*APIProject
}
APIProjectSearchResponse ...
type Config ¶
Config ...
type FedFindProject ¶
type FedFindProject struct {
Request APIProjectSearchRequest
Response chan *APIProjectSearchResponse
}
FedFindProject ...
func NewFedFindProject ¶
func NewFedFindProject(request APIProjectSearchRequest) *FedFindProject
NewFedFindProject ...
func (*FedFindProject) FedApply ¶
func (ffp *FedFindProject) FedApply(federator *Federator)
FedApply ...
type FedUpdateConfig ¶
type FedUpdateConfig struct {
}
FedUpdateConfig ...
func (*FedUpdateConfig) FedApply ¶
func (fconf *FedUpdateConfig) FedApply(federator *Federator)
FedApply ...
type HTTPResponder ¶
type HTTPResponder struct {
RequestsCh chan FedAction
}
HTTPResponder ...
func (*HTTPResponder) Error ¶
func (hr *HTTPResponder) Error(w http.ResponseWriter, r *http.Request, err error, statusCode int)
Error .....
func (*HTTPResponder) FindProject ¶
func (hr *HTTPResponder) FindProject(request APIProjectSearchRequest) *APIProjectSearchResponse
FindProject ...
func (*HTTPResponder) NotFound ¶
func (hr *HTTPResponder) NotFound(w http.ResponseWriter, r *http.Request)
NotFound .....
func (*HTTPResponder) SetHubs ¶
func (hr *HTTPResponder) SetHubs(hubs *APISetHubsRequest)
SetHubs ...
func (*HTTPResponder) UpdateConfig ¶
func (hr *HTTPResponder) UpdateConfig(config *APIUpdateConfigRequest)
UpdateConfig ...
type HubConfig ¶
type HubConfig struct {
User string
PasswordEnvVar string
ClientTimeoutMilliseconds int
Port int
FetchAllProjectsPauseSeconds int
}
HubConfig ...
func (*HubConfig) ClientTimeout ¶
ClientTimeout converts the milliseconds to a duration
func (*HubConfig) FetchAllProjectsPause ¶
FetchAllProjectsPause converts the minutes to a duration
type HubCreationResult ¶
type HubCreationResult struct {
// contains filtered or unexported fields
}
HubCreationResult ...
func (*HubCreationResult) FedApply ¶
func (hcr *HubCreationResult) FedApply(federator *Federator)
FedApply ...
type HubCreator ¶
type HubCreator struct {
// contains filtered or unexported fields
}
HubCreator ...
func NewHubCreator ¶
func NewHubCreator(hubConfig *HubConfig) (*HubCreator, error)
NewHubCreator ...
type MockResponder ¶
type MockResponder struct{}
MockResponder ...
func (*MockResponder) Error ¶
func (mr *MockResponder) Error(w http.ResponseWriter, r *http.Request, err error, statusCode int)
Error ...
func (*MockResponder) FindProject ¶
func (mr *MockResponder) FindProject(request APIProjectSearchRequest) *APIProjectSearchResponse
FindProject ...
func (*MockResponder) NotFound ¶
func (mr *MockResponder) NotFound(w http.ResponseWriter, r *http.Request)
NotFound ...
func (*MockResponder) SetHubs ¶
func (mr *MockResponder) SetHubs(hubs *APISetHubsRequest)
SetHubs ...
func (*MockResponder) UpdateConfig ¶
func (mr *MockResponder) UpdateConfig(config *APIUpdateConfigRequest)
UpdateConfig ...
type Responder ¶
type Responder interface {
GetModel() *APIModel
//
SetHubs(hubs *APISetHubsRequest)
UpdateConfig(config *APIUpdateConfigRequest)
//
FindProject(request APIProjectSearchRequest) *APIProjectSearchResponse
// errors
NotFound(w http.ResponseWriter, r *http.Request)
Error(w http.ResponseWriter, r *http.Request, err error, statusCode int)
}
Responder .....
Click to show internal directories.
Click to hide internal directories.