-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.go
More file actions
36 lines (30 loc) · 811 Bytes
/
build.go
File metadata and controls
36 lines (30 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package epp
import (
"github.com/domainr/epp2/schema/epp"
)
func Greeting(cfg *Config) (epp.Body, error) {
return &epp.Greeting{}, nil // TODO
}
func Command(cfg *Config, action epp.Action, extensions ...epp.Extension) (epp.Body, error) {
return &epp.Command{
Action: action,
Extensions: extensions,
ClientTransactionID: cfg.TransactionID(),
}, nil
}
func Login(cfg *Config, clientID, password string, newPassword *string) (epp.Body, error) {
return Command(cfg, &epp.Login{
ClientID: clientID,
Password: password,
NewPassword: newPassword,
Options: epp.Options{
Version: epp.Version,
},
})
}
func Logout(cfg *Config) (epp.Body, error) {
return Command(cfg, &epp.Logout{})
}
func ErrorResponse(cfg *Config, err error) epp.Body {
return nil // TODO
}