Documentation ¶
Index ¶
- Constants
- func ComposeHookEnvs(opts ComposeHookEnvsOptions) []string
- func IsReadmeFile(name string) bool
- func RepoCreate(UserOrOrg, ProjectName string) (bool, error)
- func RepoCreateMirror(RemoteAddr, UserOrOrg, ProjectName string) error
- func RepoDelete(UserOrOrg, ProjectName string) (bool, error)
- func RepoEditorFile(UserOrOrg, ProjectName string, opts *pb.ReqUpdateOptions) error
- func RepoList(UserOrOrg, ProjectName, TreePath string) (error, *pb.RespList)
- func RepoUpdateMirror(RemoteAddr, UserOrOrg, ProjectName string) error
- func UpdateLocalCopyBranch(repoPath, localPath, branch string, isWiki bool) (err error)
- type ComposeHookEnvsOptions
- type Repo
- func (repo *Repo) GetFile(entry *git.TreeEntry) (*pb.RespSingle, error)
- func (repo *Repo) GetFileList(path string) ([]*git.EntryCommitInfo, error)
- func (repo *Repo) GetReadme(entry *git.TreeEntry) (*pb.RespSingle, error)
- func (repo *Repo) Init(UserOrOrg, ProjectName string) error
- func (repo *Repo) RequestPath(path string) error
- type Server
- func (s *Server) Create(ctx context.Context, message *pb.ReqBase) (*pb.RespBool, error)
- func (s *Server) CreateMirror(ctx context.Context, opts *pb.ReqMirror) (*pb.RespBool, error)
- func (s *Server) Delete(ctx context.Context, message *pb.ReqBase) (*pb.RespBool, error)
- func (s *Server) Editor(ctx context.Context, opts *pb.ReqUpdateOptions) (*pb.RespBool, error)
- func (s *Server) List(ctx context.Context, message *pb.ReqList) (*pb.RespList, error)
Constants ¶
View Source
const ( ENV_AUTH_USER_ID = "FG_AUTH_USER_ID" ENV_AUTH_USER_NAME = "FG_AUTH_USER_NAME" ENV_AUTH_USER_EMAIL = "FG_AUTH_USER_EMAIL" ENV_REPO_OWNER_NAME = "FG_REPO_OWNER_NAME" ENV_REPO_OWNER_SALT_MD5 = "FG_REPO_OWNER_SALT_MD5" ENV_REPO_ID = "FG_REPO_ID" ENV_REPO_NAME = "FG_REPO_NAME" ENV_REPO_CUSTOM_HOOKS_PATH = "FG_REPO_CUSTOM_HOOKS_PATH" )
Variables ¶
This section is empty.
Functions ¶
func ComposeHookEnvs ¶
func ComposeHookEnvs(opts ComposeHookEnvsOptions) []string
func IsReadmeFile ¶
func RepoCreate ¶
Init Git Repo Project
func RepoCreateMirror ¶
func RepoEditorFile ¶
func RepoEditorFile(UserOrOrg, ProjectName string, opts *pb.ReqUpdateOptions) error
func RepoUpdateMirror ¶
func UpdateLocalCopyBranch ¶
UpdateLocalCopy fetches latest changes of given branch from repoPath to localPath. It creates a new clone if local copy does not exist, but does not checks out to a specific branch if the local copy belongs to a wiki. For existing local copy, it checks out to target branch by default, and safe to assume subsequent operations are against target branch when caller has confidence about no race condition.
Types ¶
type ComposeHookEnvsOptions ¶
type Repo ¶
type Repo struct { Commit *git.Commit LastCommit *git.Commit Tag *git.Tag GitRepo *git.Repository TipPath string Path string }
func (*Repo) GetFileList ¶
func (*Repo) RequestPath ¶
Click to show internal directories.
Click to hide internal directories.