Documentation ¶
Index ¶
- func AutoWriteFile(file_path string, data []byte, mode fs.FileMode) error
- func ConfigRead(path string, config BaseConfig) error
- func GenerateCACertificate() (*x509.Certificate, *rsa.PrivateKey)
- func HasFile(path string) bool
- func RandomString(n int) string
- func ReadJsonFile(path string, data any) error
- func WriteJsonFile(path string, data any) error
- type BaseConfig
- type Certificate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoWriteFile ¶
auto create file
func ConfigRead ¶
func ConfigRead(path string, config BaseConfig) error
func GenerateCACertificate ¶
func GenerateCACertificate() (*x509.Certificate, *rsa.PrivateKey)
func RandomString ¶
Types ¶
type BaseConfig ¶
type BaseConfig interface {
Default() any
}
type Certificate ¶
func GenerateCertificate ¶
func GenerateCertificate(ca *x509.Certificate, caKey *rsa.PrivateKey, organizations []string) Certificate
Click to show internal directories.
Click to hide internal directories.