Versions in this module Expand all Collapse all v0 v0.1.0 Apr 29, 2024 Changes in this version + var Git gitImpl + func CreateBasicAuthHeaderValue(username, password string) string + func CreatePrivateSSHKey(bitSize int) (privateKeyInPEM, authorizedKeys []byte, err error) + func GeneratePrivateRSAKey(bitSize int) (*rsa.PrivateKey, error) + func GetPublicKeyForServer(host string) (ssh.PublicKey, error) + type HTTPConfig struct + Header map[string]string + URL string + type Preparation struct + Destination RepositoryConfig + Server *Server + Source RepositoryConfig + func PrepareRepositoriesOnAServer(ctx context.Context, server *Server, testName string, ...) (*Preparation, error) + func (p *Preparation) Close(context.Context) error + type RepositoryConfig struct + HTTP HTTPConfig + RepoName string + SSH SSHConfig + Session *Session + type SSHConfig struct + KnownHosts []ssh.PublicKey + PrivateKey []byte + PrivateKeyPassword string + URL string + Username string + type Server struct + HTTPHost string + HTTPPort int + SSHHost string + SSHPort int + func ListenAndServe(ctx context.Context, giteaImage string) (*Server, error) + func (s *Server) Close(ctx context.Context) error + func (s *Server) CreateUser(ctx context.Context, username, password, email string) error + func (s *Server) HTTPAddress() string + func (s *Server) NewSession(username, password string) (*Session, error) + func (s *Server) SSHAddress() string + type Session struct + Username string + func (s *Session) AddPublicKey(ctx context.Context, publicKeyBytes []byte) error + func (s *Session) CreateFile(ctx context.Context, repoName, fileName, contents string) error + func (s *Session) CreateRepo(ctx context.Context, repoName string) error + func (s *Session) CreateTag(ctx context.Context, repoName, tagName string) error + func (s *Session) GetRefs(ctx context.Context, repoName string) (map[string]string, error) + func (s *Session) RemoveAllPublicKeys(ctx context.Context) error