api

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRunsLimit = 25
	MaxRunsLimit     = 40
)

Variables

This section is empty.

Functions

func GetConfigTypeRef

func GetConfigTypeRef(r *http.Request) (types.ConfigType, string, error)

func NewWebhooksHandler

func NewWebhooksHandler(logger *zap.Logger, ah *action.ActionHandler, configstoreClient *csapi.Client, runserviceClient *rsapi.Client, apiExposedURL string) *webhooksHandler

Types

type AddOrgMemberHandler

type AddOrgMemberHandler struct {
	// contains filtered or unexported fields
}

func NewAddOrgMemberHandler

func NewAddOrgMemberHandler(logger *zap.Logger, ah *action.ActionHandler) *AddOrgMemberHandler

func (*AddOrgMemberHandler) ServeHTTP

func (h *AddOrgMemberHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AddOrgMemberRequest

type AddOrgMemberRequest struct {
	Role types.MemberRole `json:"role"`
}

type AddOrgMemberResponse

type AddOrgMemberResponse struct {
	Organization *OrgResponse `json:"organization"`
	OrgMemberResponse
}

type AuthorizeHandler

type AuthorizeHandler struct {
	// contains filtered or unexported fields
}

func NewAuthorizeHandler

func NewAuthorizeHandler(logger *zap.Logger, ah *action.ActionHandler) *AuthorizeHandler

func (*AuthorizeHandler) ServeHTTP

func (h *AuthorizeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type AuthorizeResponse

type AuthorizeResponse struct {
	Oauth2Redirect   string              `json:"oauth2_redirect"`
	RemoteUserInfo   *gitsource.UserInfo `json:"remote_user_info"`
	RemoteSourceName string              `json:"remote_source_name"`
}

type BadgeHandler

type BadgeHandler struct {
	// contains filtered or unexported fields
}

func NewBadgeHandler

func NewBadgeHandler(logger *zap.Logger, ah *action.ActionHandler) *BadgeHandler

func (*BadgeHandler) ServeHTTP

func (h *BadgeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type BadgeRequest

type BadgeRequest struct {
	Name string `json:"name"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a Gogs API client.

func NewClient

func NewClient(url, token string) *Client

NewClient initializes and returns a API client.

func (*Client) AddOrgMember

func (c *Client) AddOrgMember(ctx context.Context, orgRef, userRef string, role types.MemberRole) (*AddOrgMemberResponse, *http.Response, error)

func (*Client) CreateOrg

func (c *Client) CreateOrg(ctx context.Context, req *CreateOrgRequest) (*OrgResponse, *http.Response, error)

func (*Client) CreateProject

func (c *Client) CreateProject(ctx context.Context, req *CreateProjectRequest) (*ProjectResponse, *http.Response, error)

func (*Client) CreateProjectGroup

func (c *Client) CreateProjectGroup(ctx context.Context, req *CreateProjectGroupRequest) (*ProjectResponse, *http.Response, error)

func (*Client) CreateProjectGroupSecret

func (c *Client) CreateProjectGroupSecret(ctx context.Context, projectGroupRef string, req *CreateSecretRequest) (*SecretResponse, *http.Response, error)

func (*Client) CreateProjectGroupVariable

func (c *Client) CreateProjectGroupVariable(ctx context.Context, projectGroupRef string, req *CreateVariableRequest) (*VariableResponse, *http.Response, error)

func (*Client) CreateProjectSecret

func (c *Client) CreateProjectSecret(ctx context.Context, projectRef string, req *CreateSecretRequest) (*SecretResponse, *http.Response, error)

func (*Client) CreateProjectVariable

func (c *Client) CreateProjectVariable(ctx context.Context, projectRef string, req *CreateVariableRequest) (*VariableResponse, *http.Response, error)

func (*Client) CreateRemoteSource

func (c *Client) CreateRemoteSource(ctx context.Context, req *CreateRemoteSourceRequest) (*RemoteSourceResponse, *http.Response, error)

func (*Client) CreateUser

func (c *Client) CreateUser(ctx context.Context, req *CreateUserRequest) (*UserResponse, *http.Response, error)

func (*Client) CreateUserLA

func (c *Client) CreateUserLA(ctx context.Context, userRef string, req *CreateUserLARequest) (*CreateUserLAResponse, *http.Response, error)

func (*Client) CreateUserToken

func (c *Client) CreateUserToken(ctx context.Context, userRef string, req *CreateUserTokenRequest) (*CreateUserTokenResponse, *http.Response, error)

func (*Client) DeleteOrg

func (c *Client) DeleteOrg(ctx context.Context, orgRef string) (*http.Response, error)

func (*Client) DeleteProject

func (c *Client) DeleteProject(ctx context.Context, projectRef string) (*http.Response, error)

func (*Client) DeleteProjectGroup

func (c *Client) DeleteProjectGroup(ctx context.Context, projectGroupRef string) (*http.Response, error)

func (*Client) DeleteProjectGroupSecret

func (c *Client) DeleteProjectGroupSecret(ctx context.Context, projectGroupRef, secretName string) (*http.Response, error)

func (*Client) DeleteProjectGroupVariable

func (c *Client) DeleteProjectGroupVariable(ctx context.Context, projectGroupRef, variableName string) (*http.Response, error)

func (*Client) DeleteProjectSecret

func (c *Client) DeleteProjectSecret(ctx context.Context, projectRef, secretName string) (*http.Response, error)

func (*Client) DeleteProjectVariable

func (c *Client) DeleteProjectVariable(ctx context.Context, projectRef, variableName string) (*http.Response, error)

func (*Client) DeleteRemoteSource

func (c *Client) DeleteRemoteSource(ctx context.Context, rsRef string) (*http.Response, error)

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, userRef string) (*http.Response, error)

func (*Client) DeleteUserLA

func (c *Client) DeleteUserLA(ctx context.Context, userRef, laID string) (*http.Response, error)

func (*Client) DeleteUserToken

func (c *Client) DeleteUserToken(ctx context.Context, userRef, tokenName string) (*http.Response, error)

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser(ctx context.Context) (*UserResponse, *http.Response, error)

func (*Client) GetOrgMembers

func (c *Client) GetOrgMembers(ctx context.Context, orgRef string) (*OrgMembersResponse, *http.Response, error)

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, projectRef string) (*ProjectResponse, *http.Response, error)

func (*Client) GetProjectGroup

func (c *Client) GetProjectGroup(ctx context.Context, projectGroupRef string) (*ProjectGroupResponse, *http.Response, error)

func (*Client) GetProjectGroupProjects

func (c *Client) GetProjectGroupProjects(ctx context.Context, projectGroupRef string) ([]*ProjectResponse, *http.Response, error)

func (*Client) GetProjectGroupSubgroups

func (c *Client) GetProjectGroupSubgroups(ctx context.Context, projectGroupRef string) ([]*ProjectGroupResponse, *http.Response, error)

func (*Client) GetRemoteSource

func (c *Client) GetRemoteSource(ctx context.Context, rsRef string) (*RemoteSourceResponse, *http.Response, error)

func (*Client) GetRemoteSources

func (c *Client) GetRemoteSources(ctx context.Context, start string, limit int, asc bool) ([]*RemoteSourceResponse, *http.Response, error)

func (*Client) GetRun

func (c *Client) GetRun(ctx context.Context, runID string) (*RunResponse, *http.Response, error)

func (*Client) GetRuns

func (c *Client) GetRuns(ctx context.Context, phaseFilter, resultFilter, groups, runGroups []string, start string, limit int, asc bool) ([]*RunsResponse, *http.Response, error)

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, userRef string) (*UserResponse, *http.Response, error)

func (*Client) GetUsers

func (c *Client) GetUsers(ctx context.Context, start string, limit int, asc bool) ([]*UserResponse, *http.Response, error)

func (*Client) ProjectCreateRun

func (c *Client) ProjectCreateRun(ctx context.Context, projectRef string, req *ProjectCreateRunRequest) (*http.Response, error)

func (*Client) ReconfigProject

func (c *Client) ReconfigProject(ctx context.Context, projectRef string) (*http.Response, error)

func (*Client) RegisterUser

func (*Client) RemoveOrgMember

func (c *Client) RemoveOrgMember(ctx context.Context, orgRef, userRef string) (*http.Response, error)

func (*Client) SetHTTPClient

func (c *Client) SetHTTPClient(client *http.Client)

SetHTTPClient replaces default http.Client with user given one.

func (*Client) UpdateProjectGroupSecret

func (c *Client) UpdateProjectGroupSecret(ctx context.Context, projectGroupRef, secretName string, req *UpdateSecretRequest) (*SecretResponse, *http.Response, error)

func (*Client) UpdateProjectGroupVariable

func (c *Client) UpdateProjectGroupVariable(ctx context.Context, projectGroupRef, variableName string, req *UpdateVariableRequest) (*VariableResponse, *http.Response, error)

func (*Client) UpdateProjectSecret

func (c *Client) UpdateProjectSecret(ctx context.Context, projectRef, secretName string, req *UpdateSecretRequest) (*SecretResponse, *http.Response, error)

func (*Client) UpdateProjectVariable

func (c *Client) UpdateProjectVariable(ctx context.Context, projectRef, variableName string, req *UpdateVariableRequest) (*VariableResponse, *http.Response, error)

func (*Client) UpdateRemoteSource

func (c *Client) UpdateRemoteSource(ctx context.Context, rsRef string, req *UpdateRemoteSourceRequest) (*RemoteSourceResponse, *http.Response, error)

func (*Client) UserCreateRun

func (c *Client) UserCreateRun(ctx context.Context, req *UserCreateRunRequest) (*http.Response, error)

type CreateOrgHandler

type CreateOrgHandler struct {
	// contains filtered or unexported fields
}

func NewCreateOrgHandler

func NewCreateOrgHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateOrgHandler

func (*CreateOrgHandler) ServeHTTP

func (h *CreateOrgHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type CreateOrgRequest

type CreateOrgRequest struct {
	Name       string           `json:"name"`
	Visibility types.Visibility `json:"visibility"`
}

type CreateProjectGroupHandler

type CreateProjectGroupHandler struct {
	// contains filtered or unexported fields
}

func NewCreateProjectGroupHandler

func NewCreateProjectGroupHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateProjectGroupHandler

func (*CreateProjectGroupHandler) ServeHTTP

type CreateProjectGroupRequest

type CreateProjectGroupRequest struct {
	Name       string           `json:"name"`
	ParentRef  string           `json:"parent_ref"`
	Visibility types.Visibility `json:"visibility"`
}

type CreateProjectHandler

type CreateProjectHandler struct {
	// contains filtered or unexported fields
}

func NewCreateProjectHandler

func NewCreateProjectHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateProjectHandler

func (*CreateProjectHandler) ServeHTTP

func (h *CreateProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type CreateProjectRequest

type CreateProjectRequest struct {
	Name                string           `json:"name,omitempty"`
	ParentRef           string           `json:"parent_ref,omitempty"`
	Visibility          types.Visibility `json:"visibility,omitempty"`
	RepoPath            string           `json:"repo_path,omitempty"`
	RemoteSourceName    string           `json:"remote_source_name,omitempty"`
	SkipSSHHostKeyCheck bool             `json:"skip_ssh_host_key_check,omitempty"`
}

type CreateRemoteSourceHandler

type CreateRemoteSourceHandler struct {
	// contains filtered or unexported fields
}

func NewCreateRemoteSourceHandler

func NewCreateRemoteSourceHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateRemoteSourceHandler

func (*CreateRemoteSourceHandler) ServeHTTP

type CreateRemoteSourceRequest

type CreateRemoteSourceRequest struct {
	Name                string `json:"name"`
	APIURL              string `json:"apiurl"`
	Type                string `json:"type"`
	AuthType            string `json:"auth_type"`
	SkipVerify          bool   `json:"skip_verify"`
	Oauth2ClientID      string `json:"oauth_2_client_id"`
	Oauth2ClientSecret  string `json:"oauth_2_client_secret"`
	SSHHostKey          string `json:"ssh_host_key"`
	SkipSSHHostKeyCheck bool   `json:"skip_ssh_host_key_check"`
	RegistrationEnabled *bool  `json:"registration_enabled"`
	LoginEnabled        *bool  `json:"login_enabled"`
}

type CreateSecretHandler

type CreateSecretHandler struct {
	// contains filtered or unexported fields
}

func NewCreateSecretHandler

func NewCreateSecretHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateSecretHandler

func (*CreateSecretHandler) ServeHTTP

func (h *CreateSecretHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type CreateSecretRequest

type CreateSecretRequest struct {
	Name string `json:"name,omitempty"`

	Type types.SecretType `json:"type,omitempty"`

	// internal secret
	Data map[string]string `json:"data,omitempty"`

	// external secret
	SecretProviderID string `json:"secret_provider_id,omitempty"`
	Path             string `json:"path,omitempty"`
}

type CreateUserHandler

type CreateUserHandler struct {
	// contains filtered or unexported fields
}

func NewCreateUserHandler

func NewCreateUserHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateUserHandler

func (*CreateUserHandler) ServeHTTP

func (h *CreateUserHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type CreateUserLAHandler

type CreateUserLAHandler struct {
	// contains filtered or unexported fields
}

func NewCreateUserLAHandler

func NewCreateUserLAHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateUserLAHandler

func (*CreateUserLAHandler) ServeHTTP

func (h *CreateUserLAHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type CreateUserLARequest

type CreateUserLARequest struct {
	RemoteSourceName          string `json:"remote_source_name"`
	RemoteSourceLoginName     string `json:"remote_source_login_name"`
	RemoteSourceLoginPassword string `json:"remote_source_login_password"`
}

type CreateUserLAResponse

type CreateUserLAResponse struct {
	LinkedAccount  *types.LinkedAccount `json:"linked_account"`
	Oauth2Redirect string               `json:"oauth2_redirect"`
}

type CreateUserRequest

type CreateUserRequest struct {
	UserName string `json:"username"`
}

type CreateUserTokenHandler

type CreateUserTokenHandler struct {
	// contains filtered or unexported fields
}

func NewCreateUserTokenHandler

func NewCreateUserTokenHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateUserTokenHandler

func (*CreateUserTokenHandler) ServeHTTP

type CreateUserTokenRequest

type CreateUserTokenRequest struct {
	TokenName string `json:"token_name"`
}

type CreateUserTokenResponse

type CreateUserTokenResponse struct {
	Token string `json:"token"`
}

type CreateVariableHandler

type CreateVariableHandler struct {
	// contains filtered or unexported fields
}

func NewCreateVariableHandler

func NewCreateVariableHandler(logger *zap.Logger, ah *action.ActionHandler) *CreateVariableHandler

func (*CreateVariableHandler) ServeHTTP

type CreateVariableRequest

type CreateVariableRequest struct {
	Name string `json:"name,omitempty"`

	Values []types.VariableValue `json:"values,omitempty"`
}

type CurrentUserHandler

type CurrentUserHandler struct {
	// contains filtered or unexported fields
}

func NewCurrentUserHandler

func NewCurrentUserHandler(logger *zap.Logger, ah *action.ActionHandler) *CurrentUserHandler

func (*CurrentUserHandler) ServeHTTP

func (h *CurrentUserHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type DeleteOrgHandler

type DeleteOrgHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteOrgHandler

func NewDeleteOrgHandler(logger *zap.Logger, ah *action.ActionHandler) *DeleteOrgHandler

func (*DeleteOrgHandler) ServeHTTP

func (h *DeleteOrgHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type DeleteProjectGroupHandler

type DeleteProjectGroupHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteProjectGroupHandler

func NewDeleteProjectGroupHandler(logger *zap.Logger, ah *action.ActionHandler) *DeleteProjectGroupHandler

func (*DeleteProjectGroupHandler) ServeHTTP

type DeleteProjectHandler

type DeleteProjectHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteProjectHandler

func NewDeleteProjectHandler(logger *zap.Logger, ah *action.ActionHandler) *DeleteProjectHandler

func (*DeleteProjectHandler) ServeHTTP

func (h *DeleteProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type DeleteRemoteSourceHandler

type DeleteRemoteSourceHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteRemoteSourceHandler

func NewDeleteRemoteSourceHandler(logger *zap.Logger, ah *action.ActionHandler) *DeleteRemoteSourceHandler

func (*DeleteRemoteSourceHandler) ServeHTTP

type DeleteSecretHandler

type DeleteSecretHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteSecretHandler

func NewDeleteSecretHandler(logger *zap.Logger, ah *action.ActionHandler) *DeleteSecretHandler

func (*DeleteSecretHandler) ServeHTTP

func (h *DeleteSecretHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type DeleteUserHandler

type DeleteUserHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteUserHandler

func NewDeleteUserHandler(logger *zap.Logger, ah *action.ActionHandler) *DeleteUserHandler

func (*DeleteUserHandler) ServeHTTP

func (h *DeleteUserHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type DeleteUserLAHandler

type DeleteUserLAHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteUserLAHandler

func NewDeleteUserLAHandler(logger *zap.Logger, ah *action.ActionHandler) *DeleteUserLAHandler

func (*DeleteUserLAHandler) ServeHTTP

func (h *DeleteUserLAHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type DeleteUserTokenHandler

type DeleteUserTokenHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteUserTokenHandler

func NewDeleteUserTokenHandler(logger *zap.Logger, ah *action.ActionHandler) *DeleteUserTokenHandler

func (*DeleteUserTokenHandler) ServeHTTP

type DeleteVariableHandler

type DeleteVariableHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteVariableHandler

func NewDeleteVariableHandler(logger *zap.Logger, ah *action.ActionHandler) *DeleteVariableHandler

func (*DeleteVariableHandler) ServeHTTP

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

func ErrorResponseFromError

func ErrorResponseFromError(err error) *ErrorResponse

type LinkedAccountResponse

type LinkedAccountResponse struct {
	ID                  string `json:"id"`
	RemoteSourceID      string `json:"remote_source_id"`
	RemoteUserName      string `json:"remote_user_name"`
	RemoteUserAvatarURL string `json:"remote_user_avatar_url"`
}

type LoginUserHandler

type LoginUserHandler struct {
	// contains filtered or unexported fields
}

func NewLoginUserHandler

func NewLoginUserHandler(logger *zap.Logger, ah *action.ActionHandler) *LoginUserHandler

func (*LoginUserHandler) ServeHTTP

func (h *LoginUserHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type LoginUserRequest

type LoginUserRequest struct {
	RemoteSourceName string `json:"remote_source_name"`
	LoginName        string `json:"login_name"`
	LoginPassword    string `json:"password"`
}

type LoginUserResponse

type LoginUserResponse struct {
	Oauth2Redirect string        `json:"oauth2_redirect"`
	Token          string        `json:"token"`
	User           *UserResponse `json:"user"`
}

type LogsHandler

type LogsHandler struct {
	// contains filtered or unexported fields
}

func NewLogsHandler

func NewLogsHandler(logger *zap.Logger, ah *action.ActionHandler) *LogsHandler

func (*LogsHandler) ServeHTTP

func (h *LogsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type OAuth2CallbackHandler

type OAuth2CallbackHandler struct {
	// contains filtered or unexported fields
}

func NewOAuth2CallbackHandler

func NewOAuth2CallbackHandler(logger *zap.Logger, ah *action.ActionHandler) *OAuth2CallbackHandler

func (*OAuth2CallbackHandler) ServeHTTP

type OrgHandler

type OrgHandler struct {
	// contains filtered or unexported fields
}

func NewOrgHandler

func NewOrgHandler(logger *zap.Logger, ah *action.ActionHandler) *OrgHandler

func (*OrgHandler) ServeHTTP

func (h *OrgHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type OrgMemberResponse

type OrgMemberResponse struct {
	User *UserResponse    `json:"user"`
	Role types.MemberRole `json:"role"`
}

type OrgMembersHandler

type OrgMembersHandler struct {
	// contains filtered or unexported fields
}

func NewOrgMembersHandler

func NewOrgMembersHandler(logger *zap.Logger, ah *action.ActionHandler) *OrgMembersHandler

func (*OrgMembersHandler) ServeHTTP

func (h *OrgMembersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type OrgMembersResponse

type OrgMembersResponse struct {
	Organization *OrgResponse         `json:"organization"`
	Members      []*OrgMemberResponse `json:"members"`
}

type OrgResponse

type OrgResponse struct {
	ID         string           `json:"id"`
	Name       string           `json:"name"`
	Visibility types.Visibility `json:"visibility,omitempty"`
}

type OrgsHandler

type OrgsHandler struct {
	// contains filtered or unexported fields
}

func NewOrgsHandler

func NewOrgsHandler(logger *zap.Logger, ah *action.ActionHandler) *OrgsHandler

func (*OrgsHandler) ServeHTTP

func (h *OrgsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ProjectCreateRunHandler

type ProjectCreateRunHandler struct {
	// contains filtered or unexported fields
}

func NewProjectCreateRunHandler

func NewProjectCreateRunHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectCreateRunHandler

func (*ProjectCreateRunHandler) ServeHTTP

type ProjectCreateRunRequest

type ProjectCreateRunRequest struct {
	Branch    string `json:"branch,omitempty"`
	Tag       string `json:"tag,omitempty"`
	Ref       string `json:"ref,omitempty"`
	CommitSHA string `json:"commit_sha,omitempty"`
}

type ProjectGroupHandler

type ProjectGroupHandler struct {
	// contains filtered or unexported fields
}

func NewProjectGroupHandler

func NewProjectGroupHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectGroupHandler

func (*ProjectGroupHandler) ServeHTTP

func (h *ProjectGroupHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ProjectGroupProjectsHandler

type ProjectGroupProjectsHandler struct {
	// contains filtered or unexported fields
}

func NewProjectGroupProjectsHandler

func NewProjectGroupProjectsHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectGroupProjectsHandler

func (*ProjectGroupProjectsHandler) ServeHTTP

type ProjectGroupResponse

type ProjectGroupResponse struct {
	ID               string           `json:"id"`
	Name             string           `json:"name"`
	Path             string           `json:"path"`
	ParentPath       string           `json:"parent_path"`
	Visibility       types.Visibility `json:"visibility"`
	GlobalVisibility string           `json:"global_visibility"`
}

type ProjectGroupSubgroupsHandler

type ProjectGroupSubgroupsHandler struct {
	// contains filtered or unexported fields
}

func NewProjectGroupSubgroupsHandler

func NewProjectGroupSubgroupsHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectGroupSubgroupsHandler

func (*ProjectGroupSubgroupsHandler) ServeHTTP

type ProjectHandler

type ProjectHandler struct {
	// contains filtered or unexported fields
}

func NewProjectHandler

func NewProjectHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectHandler

func (*ProjectHandler) ServeHTTP

func (h *ProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ProjectReconfigHandler

type ProjectReconfigHandler struct {
	// contains filtered or unexported fields
}

func NewProjectReconfigHandler

func NewProjectReconfigHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectReconfigHandler

func (*ProjectReconfigHandler) ServeHTTP

type ProjectResponse

type ProjectResponse struct {
	ID               string           `json:"id,omitempty"`
	Name             string           `json:"name,omitempty"`
	Path             string           `json:"path,omitempty"`
	ParentPath       string           `json:"parent_path,omitempty"`
	Visibility       types.Visibility `json:"visibility,omitempty"`
	GlobalVisibility string           `json:"global_visibility,omitempty"`
}

type ProjectUpdateRepoLinkedAccountHandler

type ProjectUpdateRepoLinkedAccountHandler struct {
	// contains filtered or unexported fields
}

func NewProjectUpdateRepoLinkedAccountHandler

func NewProjectUpdateRepoLinkedAccountHandler(logger *zap.Logger, ah *action.ActionHandler) *ProjectUpdateRepoLinkedAccountHandler

func (*ProjectUpdateRepoLinkedAccountHandler) ServeHTTP

type RegisterUserHandler

type RegisterUserHandler struct {
	// contains filtered or unexported fields
}

func NewRegisterUserHandler

func NewRegisterUserHandler(logger *zap.Logger, ah *action.ActionHandler) *RegisterUserHandler

func (*RegisterUserHandler) ServeHTTP

func (h *RegisterUserHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RegisterUserRequest

type RegisterUserRequest struct {
	CreateUserRequest
	CreateUserLARequest
}

type RegisterUserResponse

type RegisterUserResponse struct {
	Oauth2Redirect string `json:"oauth2_redirect"`
}

type RemoteRepoResponse

type RemoteRepoResponse struct {
	ID   string `json:"id,omitempty"`
	Path string `json:"path,omitempty"`
}

type RemoteSourceAuthResult

type RemoteSourceAuthResult struct {
	RequestType string      `json:"request_type,omitempty"`
	Response    interface{} `json:"response,omitempty"`
}

type RemoteSourceHandler

type RemoteSourceHandler struct {
	// contains filtered or unexported fields
}

func NewRemoteSourceHandler

func NewRemoteSourceHandler(logger *zap.Logger, ah *action.ActionHandler) *RemoteSourceHandler

func (*RemoteSourceHandler) ServeHTTP

func (h *RemoteSourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RemoteSourceResponse

type RemoteSourceResponse struct {
	ID                  string `json:"id"`
	Name                string `json:"name"`
	AuthType            string `json:"auth_type"`
	RegistrationEnabled bool   `json:"registration_enabled"`
	LoginEnabled        bool   `json:"login_enabled"`
}

type RemoteSourcesHandler

type RemoteSourcesHandler struct {
	// contains filtered or unexported fields
}

func NewRemoteSourcesHandler

func NewRemoteSourcesHandler(logger *zap.Logger, ah *action.ActionHandler) *RemoteSourcesHandler

func (*RemoteSourcesHandler) ServeHTTP

func (h *RemoteSourcesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RemoveOrgMemberHandler

type RemoveOrgMemberHandler struct {
	// contains filtered or unexported fields
}

func NewRemoveOrgMemberHandler

func NewRemoveOrgMemberHandler(logger *zap.Logger, ah *action.ActionHandler) *RemoveOrgMemberHandler

func (*RemoveOrgMemberHandler) ServeHTTP

type ReposHandler

type ReposHandler struct {
	// contains filtered or unexported fields
}

func NewReposHandler

func NewReposHandler(logger *zap.Logger, gitServerURL string) *ReposHandler

func (*ReposHandler) ServeHTTP

func (h *ReposHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RunActionsHandler

type RunActionsHandler struct {
	// contains filtered or unexported fields
}

func NewRunActionsHandler

func NewRunActionsHandler(logger *zap.Logger, ah *action.ActionHandler) *RunActionsHandler

func (*RunActionsHandler) ServeHTTP

func (h *RunActionsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RunActionsRequest

type RunActionsRequest struct {
	ActionType action.RunActionType `json:"action_type"`

	// Restart
	FromStart bool `json:"from_start"`
}

type RunHandler

type RunHandler struct {
	// contains filtered or unexported fields
}

func NewRunHandler

func NewRunHandler(logger *zap.Logger, ah *action.ActionHandler) *RunHandler

func (*RunHandler) ServeHTTP

func (h *RunHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RunResponse

type RunResponse struct {
	ID          string            `json:"id"`
	Counter     uint64            `json:"counter"`
	Name        string            `json:"name"`
	Annotations map[string]string `json:"annotations"`
	Phase       rstypes.RunPhase  `json:"phase"`
	Result      rstypes.RunResult `json:"result"`
	SetupErrors []string          `json:"setup_errors"`
	Stopping    bool              `json:"stopping"`

	Tasks                map[string]*RunResponseTask `json:"tasks"`
	TasksWaitingApproval []string                    `json:"tasks_waiting_approval"`

	EnqueueTime *time.Time `json:"enqueue_time"`
	StartTime   *time.Time `json:"start_time"`
	EndTime     *time.Time `json:"end_time"`

	CanRestartFromScratch     bool `json:"can_restart_from_scratch"`
	CanRestartFromFailedTasks bool `json:"can_restart_from_failed_tasks"`
}

type RunResponseTask

type RunResponseTask struct {
	ID      string                                  `json:"id"`
	Name    string                                  `json:"name"`
	Status  rstypes.RunTaskStatus                   `json:"status"`
	Level   int                                     `json:"level"`
	Depends map[string]*rstypes.RunConfigTaskDepend `json:"depends"`

	WaitingApproval     bool              `json:"waiting_approval"`
	Approved            bool              `json:"approved"`
	ApprovalAnnotations map[string]string `json:"approval_annotations"`

	StartTime *time.Time `json:"start_time"`
	EndTime   *time.Time `json:"end_time"`
}

type RunTaskActionsHandler

type RunTaskActionsHandler struct {
	// contains filtered or unexported fields
}

func NewRunTaskActionsHandler

func NewRunTaskActionsHandler(logger *zap.Logger, ah *action.ActionHandler) *RunTaskActionsHandler

func (*RunTaskActionsHandler) ServeHTTP

type RunTaskActionsRequest

type RunTaskActionsRequest struct {
	ActionType action.RunTaskActionType `json:"action_type"`
}

type RunTaskResponse

type RunTaskResponse struct {
	ID     string                `json:"id"`
	Name   string                `json:"name"`
	Status rstypes.RunTaskStatus `json:"status"`

	WaitingApproval     bool              `json:"waiting_approval"`
	Approved            bool              `json:"approved"`
	ApprovalAnnotations map[string]string `json:"approval_annotations"`

	SetupStep *RunTaskResponseSetupStep `json:"setup_step"`
	Steps     []*RunTaskResponseStep    `json:"steps"`

	StartTime *time.Time `json:"start_time"`
	EndTime   *time.Time `json:"end_time"`
}

type RunTaskResponseSetupStep

type RunTaskResponseSetupStep struct {
	Phase rstypes.ExecutorTaskPhase `json:"phase"`
	Name  string                    `json:"name"`

	StartTime *time.Time `json:"start_time"`
	EndTime   *time.Time `json:"end_time"`
}

type RunTaskResponseStep

type RunTaskResponseStep struct {
	Phase   rstypes.ExecutorTaskPhase `json:"phase"`
	Name    string                    `json:"name"`
	Command string                    `json:"command"`

	StartTime *time.Time `json:"start_time"`
	EndTime   *time.Time `json:"end_time"`
}

type RunsHandler

type RunsHandler struct {
	// contains filtered or unexported fields
}

func NewRunsHandler

func NewRunsHandler(logger *zap.Logger, ah *action.ActionHandler) *RunsHandler

func (*RunsHandler) ServeHTTP

func (h *RunsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RunsResponse

type RunsResponse struct {
	ID          string            `json:"id"`
	Counter     uint64            `json:"counter"`
	Name        string            `json:"name"`
	Annotations map[string]string `json:"annotations"`
	Phase       rstypes.RunPhase  `json:"phase"`
	Result      rstypes.RunResult `json:"result"`

	TasksWaitingApproval []string `json:"tasks_waiting_approval"`

	EnqueueTime *time.Time `json:"enqueue_time"`
	StartTime   *time.Time `json:"start_time"`
	EndTime     *time.Time `json:"end_time"`
}

type RuntaskHandler

type RuntaskHandler struct {
	// contains filtered or unexported fields
}

func NewRuntaskHandler

func NewRuntaskHandler(logger *zap.Logger, ah *action.ActionHandler) *RuntaskHandler

func (*RuntaskHandler) ServeHTTP

func (h *RuntaskHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SecretHandler

type SecretHandler struct {
	// contains filtered or unexported fields
}

func NewSecretHandler

func NewSecretHandler(logger *zap.Logger, ah *action.ActionHandler) *SecretHandler

func (*SecretHandler) ServeHTTP

func (h *SecretHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SecretResponse

type SecretResponse struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	ParentPath string `json:"parent_path"`
}

type UpdateProjectGroupHandler

type UpdateProjectGroupHandler struct {
	// contains filtered or unexported fields
}

func NewUpdateProjectGroupHandler

func NewUpdateProjectGroupHandler(logger *zap.Logger, ah *action.ActionHandler) *UpdateProjectGroupHandler

func (*UpdateProjectGroupHandler) ServeHTTP

type UpdateProjectGroupRequest

type UpdateProjectGroupRequest struct {
	Name       string           `json:"name,omitempty"`
	Visibility types.Visibility `json:"visibility,omitempty"`
}

type UpdateProjectHandler

type UpdateProjectHandler struct {
	// contains filtered or unexported fields
}

func NewUpdateProjectHandler

func NewUpdateProjectHandler(logger *zap.Logger, ah *action.ActionHandler) *UpdateProjectHandler

func (*UpdateProjectHandler) ServeHTTP

func (h *UpdateProjectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type UpdateProjectRequest

type UpdateProjectRequest struct {
	Name       string           `json:"name,omitempty"`
	Visibility types.Visibility `json:"visibility,omitempty"`
}

type UpdateRemoteSourceHandler

type UpdateRemoteSourceHandler struct {
	// contains filtered or unexported fields
}

func NewUpdateRemoteSourceHandler

func NewUpdateRemoteSourceHandler(logger *zap.Logger, ah *action.ActionHandler) *UpdateRemoteSourceHandler

func (*UpdateRemoteSourceHandler) ServeHTTP

type UpdateRemoteSourceRequest

type UpdateRemoteSourceRequest struct {
	Name                *string `json:"name"`
	APIURL              *string `json:"apiurl"`
	SkipVerify          *bool   `json:"skip_verify"`
	Oauth2ClientID      *string `json:"oauth_2_client_id"`
	Oauth2ClientSecret  *string `json:"oauth_2_client_secret"`
	SSHHostKey          *string `json:"ssh_host_key"`
	SkipSSHHostKeyCheck *bool   `json:"skip_ssh_host_key_check"`
	RegistrationEnabled *bool   `json:"registration_enabled"`
	LoginEnabled        *bool   `json:"login_enabled"`
}

type UpdateSecretHandler

type UpdateSecretHandler struct {
	// contains filtered or unexported fields
}

func NewUpdateSecretHandler

func NewUpdateSecretHandler(logger *zap.Logger, ah *action.ActionHandler) *UpdateSecretHandler

func (*UpdateSecretHandler) ServeHTTP

func (h *UpdateSecretHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type UpdateSecretRequest

type UpdateSecretRequest struct {
	Name string `json:"name,omitempty"`

	Type types.SecretType `json:"type,omitempty"`

	// internal secret
	Data map[string]string `json:"data,omitempty"`

	// external secret
	SecretProviderID string `json:"secret_provider_id,omitempty"`
	Path             string `json:"path,omitempty"`
}

type UpdateVariableHandler

type UpdateVariableHandler struct {
	// contains filtered or unexported fields
}

func NewUpdateVariableHandler

func NewUpdateVariableHandler(logger *zap.Logger, ah *action.ActionHandler) *UpdateVariableHandler

func (*UpdateVariableHandler) ServeHTTP

type UpdateVariableRequest

type UpdateVariableRequest struct {
	Name string `json:"name,omitempty"`

	Values []types.VariableValue `json:"values,omitempty"`
}

type UserCreateRunHandler

type UserCreateRunHandler struct {
	// contains filtered or unexported fields
}

func NewUserCreateRunHandler

func NewUserCreateRunHandler(logger *zap.Logger, ah *action.ActionHandler) *UserCreateRunHandler

func (*UserCreateRunHandler) ServeHTTP

func (h *UserCreateRunHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type UserCreateRunRequest

type UserCreateRunRequest struct {
	RepoUUID  string `json:"repo_uuid,omitempty"`
	RepoPath  string `json:"repo_path,omitempty"`
	Branch    string `json:"branch,omitempty"`
	CommitSHA string `json:"commit_sha,omitempty"`
	Message   string `json:"message,omitempty"`
}

type UserHandler

type UserHandler struct {
	// contains filtered or unexported fields
}

func NewUserHandler

func NewUserHandler(logger *zap.Logger, ah *action.ActionHandler) *UserHandler

func (*UserHandler) ServeHTTP

func (h *UserHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type UserRemoteReposHandler

type UserRemoteReposHandler struct {
	// contains filtered or unexported fields
}

func NewUserRemoteReposHandler

func NewUserRemoteReposHandler(logger *zap.Logger, ah *action.ActionHandler, configstoreClient *csapi.Client) *UserRemoteReposHandler

func (*UserRemoteReposHandler) ServeHTTP

type UserResponse

type UserResponse struct {
	ID             string                   `json:"id"`
	UserName       string                   `json:"username"`
	Tokens         []string                 `json:"tokens"`
	LinkedAccounts []*LinkedAccountResponse `json:"linked_accounts"`
}

type UsersHandler

type UsersHandler struct {
	// contains filtered or unexported fields
}

func NewUsersHandler

func NewUsersHandler(logger *zap.Logger, ah *action.ActionHandler) *UsersHandler

func (*UsersHandler) ServeHTTP

func (h *UsersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type VariableHandler

type VariableHandler struct {
	// contains filtered or unexported fields
}

func NewVariableHandler

func NewVariableHandler(logger *zap.Logger, ah *action.ActionHandler) *VariableHandler

func (*VariableHandler) ServeHTTP

func (h *VariableHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type VariableResponse

type VariableResponse struct {
	ID         string          `json:"id"`
	Name       string          `json:"name"`
	Values     []VariableValue `json:"values"`
	ParentPath string          `json:"parent_path"`
}

type VariableValue

type VariableValue struct {
	SecretName               string `json:"secret_name"`
	SecretVar                string `json:"secret_var"`
	MatchingSecretParentPath string `json:"matching_secret_parent_path"`

	When *types.When `json:"when"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL