blob: 332db19723146ec91c498912f06029cd9135576f (
plain)
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
37
38
39
40
41
42
43
44
45
46
|
package models
// Client client model
type Client interface {
GetID() string
GetSecret() string
GetDomain() string
GetUserID() string
}
func New(id string, secret string, domain string, userID string) Client {
return &simpleClient{
id: id,
secret: secret,
domain: domain,
userID: userID,
}
}
// simpleClient is a very simple client model that satisfies the Client interface
type simpleClient struct {
id string
secret string
domain string
userID string
}
// GetID client id
func (c *simpleClient) GetID() string {
return c.id
}
// GetSecret client secret
func (c *simpleClient) GetSecret() string {
return c.secret
}
// GetDomain client domain
func (c *simpleClient) GetDomain() string {
return c.domain
}
// GetUserID user id
func (c *simpleClient) GetUserID() string {
return c.userID
}
|