-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloudfeed.go
29 lines (26 loc) · 1.14 KB
/
cloudfeed.go
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
package cloudfeed
import "github.com/energietransitie/twomes-backoffice-api/twomes/cloudfeedauth"
// A CloudFeed is an external online data source.
type CloudFeed struct {
ID uint `json:"id"`
Name string `json:"name"`
AuthorizationURL string `json:"authorization_url"`
TokenURL string `json:"token_url"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret,omitempty"`
Scope string `json:"scope"`
RedirectURL string `json:"redirect_url"`
CloudFeedAuths []cloudfeedauth.CloudFeedAuth `json:"-"`
}
// Create a new CloudFeed.
func MakeCloudFeed(name, authorizationURL, tokenURL, clientID, clientSecret, scope, redirectURL string) CloudFeed {
return CloudFeed{
Name: name,
AuthorizationURL: authorizationURL,
TokenURL: tokenURL,
ClientID: clientID,
ClientSecret: clientSecret,
Scope: scope,
RedirectURL: redirectURL,
}
}