blob: ed31fe21b10d6bad6e1e11457c292f94a3784066 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package internal
import "fmt"
func (server *Server) OpenVPNGetConfig() (string, error) {
profile_id := server.Profiles.Current
configOpenVPN, _, configErr := server.APIConnectOpenVPN(profile_id)
if configErr != nil {
return "", &OpenVPNGetConfigError{Err: configErr}
}
return configOpenVPN, nil
}
type OpenVPNGetConfigError struct {
Err error
}
func (e *OpenVPNGetConfigError) Error() string {
return fmt.Sprintf("failed getting OpenVPN config with error: %v", e.Err)
}
|