Versions in this module Expand all Collapse all v1 v1.3.1 Jul 11, 2018 v1.3.0 Jun 10, 2018 Changes in this version + const ConfigTopic + const DEPTokenTopic + func MakeApplyDEPTokensEndpoint(svc Service) endpoint.Endpoint + func MakeGetDEPTokensEndpoint(svc Service) endpoint.Endpoint + func MakeSavePushCertificateEndpoint(svc Service) endpoint.Endpoint + func MarshalServerConfig(conf *ServerConfig) ([]byte, error) + func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption) + func UnmarshalServerConfig(data []byte, conf *ServerConfig) error + type ConfigService struct + func New(store Store) *ConfigService + func (svc *ConfigService) ApplyDEPToken(ctx context.Context, P7MContent []byte) error + func (svc *ConfigService) GetDEPTokens(ctx context.Context) ([]DEPToken, []byte, error) + func (svc *ConfigService) SavePushCertificate(ctx context.Context, cert, key []byte) error + type DEPToken struct + AccessSecret string + AccessToken string + AccessTokenExpiry time.Time + ConsumerKey string + ConsumerSecret string + func (tok DEPToken) Client() (dep.Client, error) + type Endpoints struct + ApplyDEPTokensEndpoint endpoint.Endpoint + GetDEPTokensEndpoint endpoint.Endpoint + SavePushCertificateEndpoint endpoint.Endpoint + func MakeServerEndpoints(s Service, outer endpoint.Middleware, others ...endpoint.Middleware) Endpoints + func (e Endpoints) ApplyDEPToken(ctx context.Context, P7MContent []byte) error + func (e Endpoints) GetDEPTokens(ctx context.Context) ([]DEPToken, []byte, error) + func (e Endpoints) SavePushCertificate(ctx context.Context, cert, key []byte) error + type ServerConfig struct + PrivateKey []byte + PushCertificate []byte + type Service interface + ApplyDEPToken func(ctx context.Context, P7MContent []byte) error + GetDEPTokens func(ctx context.Context) ([]DEPToken, []byte, error) + SavePushCertificate func(ctx context.Context, cert, key []byte) error + func NewHTTPClient(instance, token string, logger log.Logger, opts ...httptransport.ClientOption) (Service, error) + type Store interface + AddToken func(consumerKey string, json []byte) error + DEPKeypair func() (key *rsa.PrivateKey, cert *x509.Certificate, err error) + DEPTokens func() ([]DEPToken, error) + PushCertificate func() (*tls.Certificate, error) + PushTopic func() (string, error) + SavePushCertificate func(cert, key []byte) error