2024-01-17 13:13:58 +00:00
|
|
|
package info
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
)
|
|
|
|
|
|
|
|
type CloneProto string
|
|
|
|
|
|
|
|
const (
|
|
|
|
CloneProtoSSH CloneProto = "ssh"
|
|
|
|
CloneProtoHTTP CloneProto = "http"
|
|
|
|
DefaultCloneProto CloneProto = CloneProtoSSH
|
|
|
|
)
|
|
|
|
|
|
|
|
// Globally shared info for all remote types
|
|
|
|
// Stub package to prevent import cycle
|
|
|
|
type RemoteInfo struct {
|
2024-01-17 19:10:26 +00:00
|
|
|
Ctx context.Context // Base context for all API calls
|
|
|
|
Host string // Host as URL with protocol (e.g. https://gitlab.com)
|
|
|
|
Name string // Human-friendly name for remote
|
|
|
|
Token string // API token for remote
|
|
|
|
Type string // Remote type (e.g. gitlab, gitea)
|
|
|
|
CloneProto CloneProto // CloneProto (ssh or http) determines what url to use for git clone
|
2024-01-17 13:13:58 +00:00
|
|
|
}
|