Documentation ¶
Index ¶
- Constants
- Variables
- func Clone(ctx context.Context, repository string, options *GitCloneOptions) (string, error)
- func GetCheckoutLocation(repository, baseDirectory string) (string, error)
- type Author
- type Commit
- type GitAuth
- type GitCloneOptions
- type GitConfigManager
- type GitService
- type GitServiceConfig
- func (gsc *GitServiceConfig) AddService(service *GitService) error
- func (gsc GitServiceConfig) FindService(serviceID string) (*GitService, error)
- func (gsc GitServiceConfig) GetService(serviceType GitServiceType, serviceID string) (*GitService, error)
- func (gsc GitServiceConfig) IsServiceConfigured(service GitServiceType) bool
- type GitServiceType
- type RepositoryCloneSpec
Constants ¶
View Source
const (
GIT_SERVICE_CONFIG_FILE = "GitServiceConfig.yaml"
)
Variables ¶
View Source
var (
CHECKMATE_USER = "checkmate"
)
Functions ¶
func GetCheckoutLocation ¶
returns the checkout location on disk for the specified git repository, given a base directory The pattern for base directory is baseDirectory := path.Join(pm.GetCodeBaseDir(), projectID)
Types ¶
type GitCloneOptions ¶
type GitConfigManager ¶
type GitConfigManager interface { GetConfig() (*GitServiceConfig, error) SaveConfig(*GitServiceConfig) error }
func NewGitConfigManager ¶
func NewGitConfigManager(baseDirectory string) GitConfigManager
Git Service Config Manager
type GitService ¶
type GitService struct { InstanceURL string GraphQLEndPoint string APIEndPoint string API_Key string ID string //some unique ID for this service instance Name string //user-friendly name AccountName string //used to track Github user/org name AccountType string //(GitHub) User or Organization Type GitServiceType `json:"_"` }
func (GitService) MakeAuth ¶
func (svc GitService) MakeAuth() *GitAuth
type GitServiceConfig ¶
type GitServiceConfig struct {
GitServices map[GitServiceType]map[string]*GitService
}
func (*GitServiceConfig) AddService ¶
func (gsc *GitServiceConfig) AddService(service *GitService) error
func (GitServiceConfig) FindService ¶
func (gsc GitServiceConfig) FindService(serviceID string) (*GitService, error)
func (GitServiceConfig) GetService ¶
func (gsc GitServiceConfig) GetService(serviceType GitServiceType, serviceID string) (*GitService, error)
func (GitServiceConfig) IsServiceConfigured ¶
func (gsc GitServiceConfig) IsServiceConfigured(service GitServiceType) bool
type RepositoryCloneSpec ¶
type RepositoryCloneSpec struct { Repository string ServiceID string // the Github or Gitlab service ID Options GitCloneOptions }
Click to show internal directories.
Click to hide internal directories.