controller

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0, MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthHeader = "Authorization"
)
View Source
const DefaultBranchName = "main"

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchController

type BranchController struct {
	fx.In

	Repo                models.IRepo
	PublicStorageConfig params.AdapterConfig
}

func (BranchController) CreateBranch

func (bct BranchController) CreateBranch(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, body api.CreateBranchJSONRequestBody, ownerName string, repositoryName string)

func (BranchController) DeleteBranch

func (bct BranchController) DeleteBranch(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.DeleteBranchParams)

func (BranchController) GetBranch

func (bct BranchController) GetBranch(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.GetBranchParams)

func (BranchController) ListBranches

func (bct BranchController) ListBranches(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.ListBranchesParams)

type CommitController

type CommitController struct {
	fx.In

	Repo                models.IRepo
	PublicStorageConfig params.AdapterConfig
}

func (CommitController) CompareCommit

func (commitCtl CommitController) CompareCommit(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, basehead string, params api.CompareCommitParams)

func (CommitController) GetCommitChanges

func (commitCtl CommitController) GetCommitChanges(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, commitID string, params api.GetCommitChangesParams)

func (CommitController) GetEntriesInRef

func (commitCtl CommitController) GetEntriesInRef(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.GetEntriesInRefParams)

type CommonController

type CommonController struct {
	fx.In

	VersionChecker version.IChecker
	Config         *config.Config
}

func (CommonController) GetSetupState

func (c CommonController) GetSetupState(_ context.Context, w *api.JiaozifsResponse, _ *http.Request)

func (CommonController) GetVersion

type MergeRequestController

type MergeRequestController struct {
	fx.In

	Repo                models.IRepo
	PublicStorageConfig params.AdapterConfig
}

func (MergeRequestController) CreateMergeRequest

func (mrCtl MergeRequestController) CreateMergeRequest(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, body api.CreateMergeRequestJSONRequestBody, ownerName string, repositoryName string)

func (MergeRequestController) GetMergeRequest

func (mrCtl MergeRequestController) GetMergeRequest(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, mrSeq uint64)

func (MergeRequestController) ListMergeRequests

func (mrCtl MergeRequestController) ListMergeRequests(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.ListMergeRequestsParams)

func (MergeRequestController) Merge

func (mrCtl MergeRequestController) Merge(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, body api.MergeJSONRequestBody, ownerName string, repositoryName string, mrSeq uint64)

func (MergeRequestController) UpdateMergeRequest

func (mrCtl MergeRequestController) UpdateMergeRequest(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, body api.UpdateMergeRequestJSONRequestBody, ownerName string, repositoryName string, mrSeq uint64)

type ObjectController

type ObjectController struct {
	fx.In

	PublicStorageConfig params.AdapterConfig
	Repo                models.IRepo
}

func (ObjectController) DeleteObject

func (oct ObjectController) DeleteObject(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.DeleteObjectParams)

func (ObjectController) GetObject

func (oct ObjectController) GetObject(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.GetObjectParams)

func (ObjectController) HeadObject

func (oct ObjectController) HeadObject(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.HeadObjectParams)

func (ObjectController) UploadObject

func (oct ObjectController) UploadObject(ctx context.Context, w *api.JiaozifsResponse, r *http.Request, ownerName string, repositoryName string, params api.UploadObjectParams)

type RepositoryController

type RepositoryController struct {
	fx.In

	Repo                models.IRepo
	PublicStorageConfig params.AdapterConfig
}

func (RepositoryController) CreateRepository

func (repositoryCtl RepositoryController) CreateRepository(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, body api.CreateRepositoryJSONRequestBody)

func (RepositoryController) DeleteRepository

func (repositoryCtl RepositoryController) DeleteRepository(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string)

func (RepositoryController) GetCommitsInRef

func (repositoryCtl RepositoryController) GetCommitsInRef(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.GetCommitsInRefParams)

func (RepositoryController) GetRepository

func (repositoryCtl RepositoryController) GetRepository(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string)

func (RepositoryController) ListRepository

func (repositoryCtl RepositoryController) ListRepository(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, params api.ListRepositoryParams)

func (RepositoryController) ListRepositoryOfAuthenticatedUser

func (repositoryCtl RepositoryController) ListRepositoryOfAuthenticatedUser(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, params api.ListRepositoryOfAuthenticatedUserParams)

func (RepositoryController) UpdateRepository

func (repositoryCtl RepositoryController) UpdateRepository(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, body api.UpdateRepositoryJSONRequestBody, ownerName string, repositoryName string)

type UserController

type UserController struct {
	fx.In

	SessionStore sessions.Store
	Repo         models.IRepo
	Config       *config.AuthConfig
}

func (UserController) GetUserInfo

func (userCtl UserController) GetUserInfo(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request)

func (UserController) Login

func (UserController) Logout

func (userCtl UserController) Logout(_ context.Context, w *api.JiaozifsResponse, r *http.Request)

func (UserController) RefreshToken

func (userCtl UserController) RefreshToken(ctx context.Context, w *api.JiaozifsResponse, r *http.Request)

func (UserController) Register

type WipController

type WipController struct {
	fx.In

	Repo                models.IRepo
	PublicStorageConfig params.AdapterConfig
}

func (WipController) CommitWip

func (wipCtl WipController) CommitWip(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName, repositoryName string, params api.CommitWipParams)

CommitWip commit wip to branch, operator only could operator himself wip

func (WipController) DeleteWip

func (wipCtl WipController) DeleteWip(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.DeleteWipParams)

DeleteWip delete active working in process operator only can delete himself wip

func (WipController) GetWip

func (wipCtl WipController) GetWip(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.GetWipParams)

GetWip get wip of specific repository, operator only get himself wip

func (WipController) GetWipChanges

func (wipCtl WipController) GetWipChanges(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName, repositoryName string, params api.GetWipChangesParams)

GetWipChanges return wip difference, operator only see himself wip

func (WipController) ListWip

func (wipCtl WipController) ListWip(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string)

ListWip return wips of branches, operator only see himself wips in specific repository

func (WipController) RevertWipChanges

func (wipCtl WipController) RevertWipChanges(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, ownerName string, repositoryName string, params api.RevertWipChangesParams)

RevertWipChanges revert wip changes, if path is empty, revert all

func (WipController) UpdateWip

func (wipCtl WipController) UpdateWip(ctx context.Context, w *api.JiaozifsResponse, _ *http.Request, body api.UpdateWipJSONRequestBody, ownerName string, repositoryName string, params api.UpdateWipParams)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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