Documentation
¶
Index ¶
- Constants
- type Service
- func (service *Service) DeleteStackFiles(projectPath string) error
- func (service *Service) DeleteTLSFiles(folder string) error
- func (service *Service) GetPathForTLSFile(folder string, fileType dockm.TLSFileType) (string, error)
- func (service *Service) StoreComposeEnvFile(name, envFileContent string) error
- func (service *Service) StoreComposeFile(name, composeFileContent string) (string, error)
- func (service *Service) StoreTLSFile(folder string, fileType dockm.TLSFileType, r io.Reader) error
Constants ¶
const ( // TLSStorePath represents the subfolder where TLS files are stored in the file store folder. TLSStorePath = "tls" // LDAPStorePath represents the subfolder where LDAP TLS files are stored in the TLSStorePath. LDAPStorePath = "ldap" // TLSCACertFile represents the name on disk for a TLS CA file. TLSCACertFile = "ca.pem" // TLSCertFile represents the name on disk for a TLS certificate file. TLSCertFile = "cert.pem" // TLSKeyFile represents the name on disk for a TLS key file. TLSKeyFile = "key.pem" // ComposeStorePath represents the subfolder where compose files are stored in the file store folder. ComposeStorePath = "compose" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a service for managing files and directories.
func NewService ¶
NewService initializes a new service. It creates a data directory and a directory to store files inside this directory if they don't exist.
func (*Service) DeleteStackFiles ¶
DeleteStackFiles deletes a folder containing all the files associated to a stack.
func (*Service) DeleteTLSFiles ¶
DeleteTLSFiles deletes a folder containing the TLS files for an endpoint.
func (*Service) GetPathForTLSFile ¶
func (service *Service) GetPathForTLSFile(folder string, fileType dockm.TLSFileType) (string, error)
GetPathForTLSFile returns the absolute path to a specific TLS file for an endpoint.
func (*Service) StoreComposeEnvFile ¶
StoreComposeEnvFile stores a new .env file in the stack store path using the content of envFileContent.
func (*Service) StoreComposeFile ¶
StoreComposeFile creates a subfolder in the ComposeStorePath and stores a new file using the content from composeFileContent. It returns the path to the folder where the file is stored.