Documentation ¶
Index ¶
- func DecodeDEPAccountInfoResponse(_ context.Context, r *http.Response) (interface{}, error)
- func DecodeDEPDeviceDetailsReponse(_ context.Context, r *http.Response) (interface{}, error)
- func DecodeDEPProfileResponse(_ context.Context, r *http.Response) (interface{}, error)
- func DecodeDevicesResponse(_ context.Context, r *http.Response) (interface{}, error)
- func DecodeGetBlueprintsResponse(_ context.Context, r *http.Response) (interface{}, error)
- func DecodeGetDEPTokensResponse(_ context.Context, r *http.Response) (interface{}, error)
- func DecodeGetProfilesResponse(_ context.Context, r *http.Response) (interface{}, error)
- func DecodeListAppsResponse(_ context.Context, r *http.Response) (interface{}, error)
- func DecodeListUsersResponse(_ context.Context, r *http.Response) (interface{}, error)
- func EncodeError(ctx context.Context, err error, w http.ResponseWriter)
- func EncodeHTTPGenericRequest(_ context.Context, r *http.Request, request interface{}) error
- func MakeGetBlueprintsEndpoint(svc Service) endpoint.Endpoint
- func MakeGetDEPAccountInfoEndpoint(svc Service) endpoint.Endpoint
- func MakeGetDEPDeviceDetailsEndpoint(svc Service) endpoint.Endpoint
- func MakeGetDEPProfileEndpoint(svc Service) endpoint.Endpoint
- func MakeGetDEPTokensEndpoint(svc Service) endpoint.Endpoint
- func MakeGetProfilesEndpoint(svc Service) endpoint.Endpoint
- func MakeListAppsEndpoint(svc Service) endpoint.Endpoint
- func MakeListDevicesEndpoint(svc Service) endpoint.Endpoint
- func MakeListUsersEndpoint(svc Service) endpoint.Endpoint
- type AppDTO
- type DEPService
- type DeviceDTO
- type Endpoints
- func (e Endpoints) GetBlueprints(ctx context.Context, opt GetBlueprintsOption) ([]blueprint.Blueprint, error)
- func (e Endpoints) GetDEPAccountInfo(ctx context.Context) (*dep.Account, error)
- func (e Endpoints) GetDEPDevice(ctx context.Context, serials []string) (*dep.DeviceDetailsResponse, error)
- func (e Endpoints) GetDEPProfile(ctx context.Context, uuid string) (*dep.Profile, error)
- func (e Endpoints) GetDEPTokens(ctx context.Context) ([]deptoken.DEPToken, []byte, error)
- func (e Endpoints) GetProfiles(ctx context.Context, opt GetProfilesOption) ([]profile.Profile, error)
- func (e Endpoints) ListApplications(ctx context.Context, opts ListAppsOption) ([]AppDTO, error)
- func (e Endpoints) ListDevices(ctx context.Context, opts ListDevicesOption) ([]DeviceDTO, error)
- func (e Endpoints) ListUsers(ctx context.Context, opts ListUsersOption) ([]user.User, error)
- type GetBlueprintsOption
- type GetProfilesOption
- type HTTPHandlers
- type ListAppsOption
- type ListDevicesOption
- type ListService
- func (svc *ListService) GetBlueprints(ctx context.Context, opt GetBlueprintsOption) ([]blueprint.Blueprint, error)
- func (svc *ListService) GetDEPAccountInfo(ctx context.Context) (*dep.Account, error)
- func (svc *ListService) GetDEPDevice(ctx context.Context, serials []string) (*dep.DeviceDetailsResponse, error)
- func (svc *ListService) GetDEPProfile(ctx context.Context, uuid string) (*dep.Profile, error)
- func (svc *ListService) GetDEPTokens(ctx context.Context) ([]deptoken.DEPToken, []byte, error)
- func (svc *ListService) GetProfiles(ctx context.Context, opt GetProfilesOption) ([]profile.Profile, error)
- func (svc *ListService) ListApplications(ctx context.Context, opts ListAppsOption) ([]AppDTO, error)
- func (svc *ListService) ListDevices(ctx context.Context, opt ListDevicesOption) ([]DeviceDTO, error)
- func (svc *ListService) ListUsers(ctx context.Context, opts ListUsersOption) ([]user.User, error)
- func (svc *ListService) WatchTokenUpdates(pubsub pubsub.Subscriber) error
- type ListUsersOption
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeDevicesResponse ¶
func DecodeListAppsResponse ¶
func DecodeListUsersResponse ¶ added in v1.2.0
func EncodeError ¶
func EncodeError(ctx context.Context, err error, w http.ResponseWriter)
func EncodeHTTPGenericRequest ¶
EncodeHTTPGenericRequest is a transport/http.EncodeRequestFunc that JSON-encodes any request to the request body. Primarily useful in a client.
func MakeGetProfilesEndpoint ¶
func MakeListAppsEndpoint ¶
func MakeListDevicesEndpoint ¶
func MakeListUsersEndpoint ¶ added in v1.2.0
Types ¶
type DEPService ¶
type Endpoints ¶
type Endpoints struct { ListDevicesEndpoint endpoint.Endpoint GetDEPTokensEndpoint endpoint.Endpoint GetBlueprintsEndpoint endpoint.Endpoint GetProfilesEndpoint endpoint.Endpoint GetDEPAccountInfoEndpoint endpoint.Endpoint GetDEPDeviceEndpoint endpoint.Endpoint GetDEPProfileEndpoint endpoint.Endpoint ListAppsEndpont endpoint.Endpoint ListUserEndpoint endpoint.Endpoint }
func (Endpoints) GetBlueprints ¶
func (Endpoints) GetDEPAccountInfo ¶
func (Endpoints) GetDEPDevice ¶
func (Endpoints) GetDEPProfile ¶
func (Endpoints) GetDEPTokens ¶
func (Endpoints) GetProfiles ¶
func (Endpoints) ListApplications ¶
func (Endpoints) ListDevices ¶
type GetBlueprintsOption ¶
type GetBlueprintsOption struct {
FilterName string
}
type GetProfilesOption ¶
type GetProfilesOption struct {
Identifier string `json:"id"`
}
type HTTPHandlers ¶
type HTTPHandlers struct { ListDevicesHandler http.Handler GetDEPTokensHandler http.Handler GetBlueprintsHandler http.Handler GetProfilesHandler http.Handler GetDEPAccountInfoHandler http.Handler GetDEPProfileHandler http.Handler GetDEPDeviceDetailsHandler http.Handler ListAppsHandler http.Handler ListUsersHander http.Handler }
func MakeHTTPHandlers ¶
func MakeHTTPHandlers(ctx context.Context, endpoints Endpoints, opts ...httptransport.ServerOption) HTTPHandlers
type ListAppsOption ¶
type ListAppsOption struct {
FilterName []string `json:"filter_name"`
}
type ListDevicesOption ¶
type ListService ¶
type ListService struct { DEPClient dep.Client Devices *device.DB Blueprints *blueprint.DB Profiles *profile.DB Tokens *deptoken.DB Apps appstore.AppStore Users *user.DB // contains filtered or unexported fields }
func (*ListService) GetBlueprints ¶
func (svc *ListService) GetBlueprints(ctx context.Context, opt GetBlueprintsOption) ([]blueprint.Blueprint, error)
func (*ListService) GetDEPAccountInfo ¶
func (*ListService) GetDEPDevice ¶
func (svc *ListService) GetDEPDevice(ctx context.Context, serials []string) (*dep.DeviceDetailsResponse, error)
func (*ListService) GetDEPProfile ¶
func (*ListService) GetDEPTokens ¶
func (*ListService) GetProfiles ¶
func (svc *ListService) GetProfiles(ctx context.Context, opt GetProfilesOption) ([]profile.Profile, error)
func (*ListService) ListApplications ¶
func (svc *ListService) ListApplications(ctx context.Context, opts ListAppsOption) ([]AppDTO, error)
func (*ListService) ListDevices ¶
func (svc *ListService) ListDevices(ctx context.Context, opt ListDevicesOption) ([]DeviceDTO, error)
func (*ListService) ListUsers ¶ added in v1.2.0
func (svc *ListService) ListUsers(ctx context.Context, opts ListUsersOption) ([]user.User, error)
func (*ListService) WatchTokenUpdates ¶
func (svc *ListService) WatchTokenUpdates(pubsub pubsub.Subscriber) error
type ListUsersOption ¶ added in v1.2.0
type Service ¶
type Service interface { ListDevices(ctx context.Context, opt ListDevicesOption) ([]DeviceDTO, error) ListUsers(ctx context.Context, opt ListUsersOption) ([]user.User, error) GetDEPTokens(ctx context.Context) ([]deptoken.DEPToken, []byte, error) GetBlueprints(ctx context.Context, opt GetBlueprintsOption) ([]blueprint.Blueprint, error) GetProfiles(ctx context.Context, opt GetProfilesOption) ([]profile.Profile, error) ListApplications(ctx context.Context, opt ListAppsOption) ([]AppDTO, error) DEPService }
func NewClient ¶
func NewClient(instance string, logger log.Logger, token string, opts ...httptransport.ClientOption) (Service, error)
Click to show internal directories.
Click to hide internal directories.