Documentation ¶
Index ¶
- Constants
- func MakeApplyDEPTokensEndpoint(svc Service) endpoint.Endpoint
- func MakeGetDEPTokensEndpoint(svc Service) endpoint.Endpoint
- func MakeGetPushCertificateEndpoint(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
- func (svc *ConfigService) ApplyDEPToken(ctx context.Context, P7MContent []byte) error
- func (svc *ConfigService) GetDEPTokens(ctx context.Context) ([]DEPToken, []byte, error)
- func (svc *ConfigService) GetPushCertificate(ctx context.Context) ([]byte, error)
- func (svc *ConfigService) SavePushCertificate(ctx context.Context, cert, key []byte) error
- type DEPToken
- type Endpoints
- func (e Endpoints) ApplyDEPToken(ctx context.Context, P7MContent []byte) error
- func (e Endpoints) GetDEPTokens(ctx context.Context) ([]DEPToken, []byte, error)
- func (e Endpoints) GetPushCertificate(ctx context.Context) ([]byte, error)
- func (e Endpoints) SavePushCertificate(ctx context.Context, cert, key []byte) error
- type ServerConfig
- type Service
- type Store
Constants ¶
View Source
const ConfigTopic = "mdm.ServerConfigUpdated"
View Source
const DEPTokenTopic = "mdm.TokenAdded"
Variables ¶
This section is empty.
Functions ¶
func MarshalServerConfig ¶
func MarshalServerConfig(conf *ServerConfig) ([]byte, error)
func RegisterHTTPHandlers ¶
func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption)
func UnmarshalServerConfig ¶
func UnmarshalServerConfig(data []byte, conf *ServerConfig) error
Types ¶
type ConfigService ¶
type ConfigService struct {
// contains filtered or unexported fields
}
func New ¶
func New(store Store) *ConfigService
func (*ConfigService) ApplyDEPToken ¶
func (svc *ConfigService) ApplyDEPToken(ctx context.Context, P7MContent []byte) error
func (*ConfigService) GetDEPTokens ¶
func (*ConfigService) GetPushCertificate ¶
func (svc *ConfigService) GetPushCertificate(ctx context.Context) ([]byte, error)
func (*ConfigService) SavePushCertificate ¶
func (svc *ConfigService) SavePushCertificate(ctx context.Context, cert, key []byte) error
type DEPToken ¶
type Endpoints ¶
type Endpoints struct { SavePushCertificateEndpoint endpoint.Endpoint GetPushCertificateEndpoint endpoint.Endpoint ApplyDEPTokensEndpoint endpoint.Endpoint GetDEPTokensEndpoint endpoint.Endpoint }
func MakeServerEndpoints ¶
func MakeServerEndpoints(s Service, outer endpoint.Middleware, others ...endpoint.Middleware) Endpoints
func (Endpoints) ApplyDEPToken ¶
func (Endpoints) GetDEPTokens ¶
func (Endpoints) GetPushCertificate ¶
type ServerConfig ¶
ServerConfig holds the configuration of the MDM Server.
type Service ¶
type Service interface { SavePushCertificate(ctx context.Context, cert, key []byte) error GetPushCertificate(ctx context.Context) ([]byte, error) ApplyDEPToken(ctx context.Context, P7MContent []byte) error GetDEPTokens(ctx context.Context) ([]DEPToken, []byte, error) }
func NewHTTPClient ¶
func NewHTTPClient(instance, token string, logger log.Logger, opts ...httptransport.ClientOption) (Service, error)
type Store ¶
type Store interface { SavePushCertificate(cert, key []byte) error GetPushCertificate() ([]byte, error) PushCertificate() (*tls.Certificate, error) PushTopic() (string, error) DEPKeypair() (key *rsa.PrivateKey, cert *x509.Certificate, err error) AddToken(consumerKey string, json []byte) error DEPTokens() ([]DEPToken, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.