Documentation ¶
Overview ¶
Package config provides the config details for the services.
Index ¶
- func AddUser(rawText string) error
- func GenerateAccountKey(c *Config, s *Service, a *Account) (string, error)
- func GenerateAuthUrl(oauthConf *oauth2.Config) (string, string, error)
- func GenerateOauthConfig(url string, s *Service) (*oauth2.Config, error)
- func RemoveAccount(i int, s int) error
- func RemoveService(i int) error
- func RemoveUser(rawText string) error
- func SetEndpointUrl(rawText string) error
- func VerifyState(code string, state string) (string, error)
- type Account
- type AccountUpdater
- type ClientCreds
- type Config
- type Domain
- type Engine
- type OauthServiceCreds
- type Service
- type ServiceUpdater
- func (u *ServiceUpdater) AuthURL(authURL string) error
- func (u *ServiceUpdater) ClientID(clientID string) error
- func (u *ServiceUpdater) ClientSecret(clientSecret string) error
- func (u *ServiceUpdater) Commit() (interface{}, error)
- func (u *ServiceUpdater) EngineName(engineName string) error
- func (u *ServiceUpdater) Name(name string) error
- func (u *ServiceUpdater) Scopes(scopes string) error
- func (u *ServiceUpdater) TokenURL(tokenURL string) error
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAccountKey ¶
func RemoveAccount ¶
func RemoveService ¶
func RemoveUser ¶
func SetEndpointUrl ¶
Types ¶
type Account ¶
type Account struct { AccountName string // name for this account ServiceURL string // service endpoint to be connected OauthAccountCreds *oauth2.Token ClientCreds *ClientCreds }
Account stores the account name and the credential details for connections to/from the web-api-gateway.
type AccountUpdater ¶
func NewAccountUpdater ¶
func NewAccountUpdater(previousName string, s int) (*AccountUpdater, error)
func (*AccountUpdater) ClientCreds ¶
func (u *AccountUpdater) ClientCreds() error
func (*AccountUpdater) Commit ¶
func (u *AccountUpdater) Commit() (interface{}, error)
func (*AccountUpdater) Name ¶
func (u *AccountUpdater) Name(name string) error
func (*AccountUpdater) OauthCreds ¶
func (u *AccountUpdater) OauthCreds(code string) error
func (*AccountUpdater) ServiceURL ¶
func (u *AccountUpdater) ServiceURL(serviceURL string) error
type ClientCreds ¶
type ClientCreds struct { Protocol string // rule for encrypting messages PrivateKey string // key for encrypting messages }
ClientCreds stores the autorization details to connect to this account.
type Config ¶
Config is the root for configuration of the web-api-gateway.
func ReadConfig ¶
func ReadWriteConfig ¶
type OauthServiceCreds ¶
type OauthServiceCreds struct { ClientID string // public identifier ClientSecret string // secret identifier AuthURL string // authenticaiton endpoint TokenURL string // token request endpoint Scopes []string // scopes of the requests }
OauthServiceCreds stores the information to get authorized to connect new accounts.
type Service ¶
type Service struct { ServiceName string // name for reference when setting up an account OauthServiceCreds *OauthServiceCreds Accounts []*Account EngineName string }
Service represents a distinct endpoint that can contain multiple account.
type ServiceUpdater ¶
type ServiceUpdater struct {
// contains filtered or unexported fields
}
func NewServiceUpdater ¶
func NewServiceUpdater(previousName string) (*ServiceUpdater, error)
func (*ServiceUpdater) AuthURL ¶
func (u *ServiceUpdater) AuthURL(authURL string) error
func (*ServiceUpdater) ClientID ¶
func (u *ServiceUpdater) ClientID(clientID string) error
func (*ServiceUpdater) ClientSecret ¶
func (u *ServiceUpdater) ClientSecret(clientSecret string) error
func (*ServiceUpdater) Commit ¶
func (u *ServiceUpdater) Commit() (interface{}, error)
func (*ServiceUpdater) EngineName ¶
func (u *ServiceUpdater) EngineName(engineName string) error
func (*ServiceUpdater) Name ¶
func (u *ServiceUpdater) Name(name string) error
func (*ServiceUpdater) Scopes ¶
func (u *ServiceUpdater) Scopes(scopes string) error
func (*ServiceUpdater) TokenURL ¶
func (u *ServiceUpdater) TokenURL(tokenURL string) error
Click to show internal directories.
Click to hide internal directories.