Documentation
¶
Overview ¶
endpoints.go
Index ¶
- func NewGithubFactory(server *Server) *githubFactory
- type ApprovalYesNoQuestionAnswersResponse
- type PullRequestEventCreateParams
- type Server
- func (server *Server) AddAllRoutes()
- func (server *Server) AddApprovalRoutes()
- func (server *Server) AddHealthRoutes()
- func (server *Server) AddWebhookEventsRoutes()
- func (server *Server) GetApproval(w http.ResponseWriter, req *http.Request)
- func (server *Server) GetApprovalQueryParam(w http.ResponseWriter, req *http.Request)
- func (server *Server) GetHealth(w http.ResponseWriter, r *http.Request)
- func (server *Server) GetOrCreateApproval(ctx context.Context, querier postgres.Querier, p postgres.CreateApprovalParams) (postgres.Approval, error)
- func (server *Server) GetOrCreateGithubUser(ctx context.Context, querier postgres.Querier, ...) (postgres.GhUser, error)
- func (server *Server) GetOrCreateInstallation(ctx context.Context, querier postgres.Querier, id int32) error
- func (server *Server) GetOrCreatePullRequest(ctx context.Context, querier postgres.Querier, ...) (postgres.PullRequest, error)
- func (server *Server) GetOrCreatePullRequestAction(ctx context.Context, querier postgres.Querier, name string) error
- func (server *Server) GetOrCreateRepo(ctx context.Context, querier postgres.Querier, p postgres.CreateRepoParams) (postgres.Repo, error)
- func (server *Server) GetQuerier() *postgres.Queries
- func (server *Server) GetRouter() *mux.Router
- func (server *Server) PostWebhookEvent(w http.ResponseWriter, r *http.Request)
- func (server *Server) UpdateApproval(w http.ResponseWriter, req *http.Request)
- func (server *Server) WithPrivateKey(key *rsa.PrivateKey) *Server
- func (server *Server) WithRoutes() *Server
- type UrlEncodedFormAnswers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGithubFactory ¶
func NewGithubFactory(server *Server) *githubFactory
Types ¶
type ApprovalYesNoQuestionAnswersResponse ¶ added in v0.0.2
type ApprovalYesNoQuestionAnswersResponse struct { Uuid string `json:"uuid"` Questions []postgres.GetSortedApprovalYesNoQuestionAnswersByUuidRow `json:"questions"` }
type PullRequestEventCreateParams ¶
type PullRequestEventCreateParams struct { InstallationID int32 GithubUser postgres.CreateGithubUserParams Repo postgres.CreateRepoParams PullRequest postgres.CreatePullRequestParams PullRequestEvent postgres.CreatePullRequestEventParams Approval postgres.CreateApprovalParams }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves HTTP requests for the api and uses store to interact with the Querier interface created by sqlc.
func (*Server) AddApprovalRoutes ¶
func (server *Server) AddApprovalRoutes()
func (*Server) AddHealthRoutes ¶
func (server *Server) AddHealthRoutes()
func (*Server) AddWebhookEventsRoutes ¶
func (server *Server) AddWebhookEventsRoutes()
func (*Server) GetApproval ¶
func (server *Server) GetApproval(w http.ResponseWriter, req *http.Request)
func (*Server) GetApprovalQueryParam ¶
func (server *Server) GetApprovalQueryParam(w http.ResponseWriter, req *http.Request)
func (*Server) GetOrCreateApproval ¶
func (*Server) GetOrCreateGithubUser ¶
func (*Server) GetOrCreateInstallation ¶
func (*Server) GetOrCreatePullRequest ¶
func (server *Server) GetOrCreatePullRequest(ctx context.Context, querier postgres.Querier, p postgres.CreatePullRequestParams) (postgres.PullRequest, error)
func (*Server) GetOrCreatePullRequestAction ¶
func (*Server) GetOrCreateRepo ¶
func (*Server) GetQuerier ¶
func (*Server) PostWebhookEvent ¶
func (server *Server) PostWebhookEvent(w http.ResponseWriter, r *http.Request)
func (*Server) UpdateApproval ¶
func (server *Server) UpdateApproval(w http.ResponseWriter, req *http.Request)
func (*Server) WithPrivateKey ¶
func (server *Server) WithPrivateKey(key *rsa.PrivateKey) *Server
func (*Server) WithRoutes ¶
type UrlEncodedFormAnswers ¶ added in v0.0.2
type UrlEncodedFormAnswers struct {
Data string `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.