Documentation ¶
Index ¶
- func IsNotFound(err error) bool
- func MakeApplyProfileEndpoint(svc Service) endpoint.Endpoint
- func MakeGetProfilesEndpoint(svc Service) endpoint.Endpoint
- func MakeHTTPHandler(e Endpoints, logger log.Logger) *mux.Router
- func MakeRemoveProfilesEndpoint(svc Service) endpoint.Endpoint
- func MarshalProfile(p *Profile) ([]byte, error)
- func UnmarshalProfile(data []byte, p *Profile) error
- type Endpoints
- type GetProfilesOption
- type Mobileconfig
- type Profile
- type ProfileService
- type Service
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
func MakeGetProfilesEndpoint ¶
func MarshalProfile ¶
func UnmarshalProfile ¶
Types ¶
type Endpoints ¶
type Endpoints struct { ApplyProfileEndpoint endpoint.Endpoint GetProfilesEndpoint endpoint.Endpoint RemoveProfilesEndpoint endpoint.Endpoint }
func MakeServerEndpoints ¶
func (Endpoints) ApplyProfile ¶
func (Endpoints) GetProfiles ¶
type GetProfilesOption ¶
type GetProfilesOption struct {
Identifier string `json:"id"`
}
type Mobileconfig ¶
type Mobileconfig []byte
func (*Mobileconfig) GetPayloadIdentifier ¶
func (mc *Mobileconfig) GetPayloadIdentifier() (string, error)
type Profile ¶
type Profile struct { Identifier string Mobileconfig Mobileconfig }
type ProfileService ¶
type ProfileService struct {
// contains filtered or unexported fields
}
func New ¶
func New(store Store) *ProfileService
func (*ProfileService) ApplyProfile ¶
func (svc *ProfileService) ApplyProfile(ctx context.Context, p *Profile) error
func (*ProfileService) GetProfiles ¶
func (svc *ProfileService) GetProfiles(ctx context.Context, opt GetProfilesOption) ([]Profile, error)
func (*ProfileService) RemoveProfiles ¶
func (svc *ProfileService) RemoveProfiles(ctx context.Context, ids []string) error
type Service ¶
type Service interface { ApplyProfile(ctx context.Context, p *Profile) error GetProfiles(ctx context.Context, opt GetProfilesOption) ([]Profile, error) RemoveProfiles(ctx context.Context, ids []string) error }
func NewHTTPClient ¶
func NewHTTPClient(instance, token string, logger log.Logger, opts ...httptransport.ClientOption) (Service, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
profileproto
Package profileproto is a generated protocol buffer package.
|
Package profileproto is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.