Documentation
¶
Index ¶
- Variables
- func ExitCode(err error) int
- func IsTerminalFile(file *os.File) func() bool
- func New(deps Dependencies) *cobra.Command
- type AuthorizationError
- type Dependencies
- type Device
- type DoctorCheck
- type HistoryDelivery
- type HistoryDetail
- type HistoryItem
- type HistoryRevision
- type LoginChallenge
- type LoginRequest
- type PairChallenge
- type PairRequest
- type PairResult
- type PushRequest
- type PushResult
- type Service
- type ServiceError
- type StatusResult
- type UnconfiguredService
- func (UnconfiguredService) Devices(context.Context) ([]Device, error)
- func (UnconfiguredService) Doctor(context.Context) ([]DoctorCheck, error)
- func (UnconfiguredService) History(context.Context) ([]HistoryItem, error)
- func (UnconfiguredService) HistoryShow(context.Context, string) (HistoryDetail, error)
- func (UnconfiguredService) Login(context.Context, LoginRequest) (PairResult, error)
- func (UnconfiguredService) Logout(context.Context) error
- func (UnconfiguredService) Pair(context.Context, PairRequest) (PairResult, error)
- func (UnconfiguredService) Push(context.Context, PushRequest) (PushResult, error)
- func (UnconfiguredService) Rename(context.Context, string) error
- func (UnconfiguredService) Status(context.Context) (StatusResult, error)
- func (UnconfiguredService) Usage(context.Context) (UsageResult, error)
- type UsageError
- type UsageResult
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrServiceUnconfigured = errors.New("Pushman API transport is not configured in this scaffold")
Functions ¶
func IsTerminalFile ¶
func New ¶
func New(deps Dependencies) *cobra.Command
Types ¶
type AuthorizationError ¶
type AuthorizationError struct{ Err error }
func (*AuthorizationError) Error ¶
func (e *AuthorizationError) Error() string
func (*AuthorizationError) Unwrap ¶
func (e *AuthorizationError) Unwrap() error
type Dependencies ¶
type DoctorCheck ¶
type HistoryDelivery ¶
type HistoryDetail ¶
type HistoryDetail struct {
LogicalMessageID string
Read bool
Revisions []HistoryRevision
}
type HistoryItem ¶
type HistoryRevision ¶
type LoginChallenge ¶
type LoginRequest ¶
type LoginRequest struct {
Platform string
SuggestedName string
OnChallenge func(LoginChallenge) error
}
type PairChallenge ¶
type PairRequest ¶
type PairRequest struct {
Platform string
SuggestedName string
OnChallenge func(PairChallenge) error
}
type PairResult ¶
type PairResult struct {
Nickname string
}
type PushRequest ¶
type PushRequest struct {
Body string `json:"body"`
Title string `json:"title,omitempty"`
Subtitle string `json:"subtitle,omitempty"`
URL string `json:"url,omitempty"`
Group string `json:"group,omitempty"`
Image string `json:"image,omitempty"`
Sound string `json:"sound"`
Key string `json:"key,omitempty"`
Format string `json:"format"`
Devices []string `json:"devices,omitempty"`
}
type PushResult ¶
type Service ¶
type Service interface {
Pair(context.Context, PairRequest) (PairResult, error)
Login(context.Context, LoginRequest) (PairResult, error)
Status(context.Context) (StatusResult, error)
Rename(context.Context, string) error
Logout(context.Context) error
Push(context.Context, PushRequest) (PushResult, error)
Devices(context.Context) ([]Device, error)
History(context.Context) ([]HistoryItem, error)
HistoryShow(context.Context, string) (HistoryDetail, error)
Usage(context.Context) (UsageResult, error)
Doctor(context.Context) ([]DoctorCheck, error)
}
Service is the command-facing boundary for the future generated API client and credential store. Its concrete HTTP implementation follows the shared OpenAPI contract.
type ServiceError ¶
func (*ServiceError) Error ¶
func (e *ServiceError) Error() string
type StatusResult ¶
type UnconfiguredService ¶
type UnconfiguredService struct{}
func (UnconfiguredService) Devices ¶
func (UnconfiguredService) Devices(context.Context) ([]Device, error)
func (UnconfiguredService) Doctor ¶
func (UnconfiguredService) Doctor(context.Context) ([]DoctorCheck, error)
func (UnconfiguredService) History ¶
func (UnconfiguredService) History(context.Context) ([]HistoryItem, error)
func (UnconfiguredService) HistoryShow ¶
func (UnconfiguredService) HistoryShow(context.Context, string) (HistoryDetail, error)
func (UnconfiguredService) Login ¶
func (UnconfiguredService) Login(context.Context, LoginRequest) (PairResult, error)
func (UnconfiguredService) Pair ¶
func (UnconfiguredService) Pair(context.Context, PairRequest) (PairResult, error)
func (UnconfiguredService) Push ¶
func (UnconfiguredService) Push(context.Context, PushRequest) (PushResult, error)
func (UnconfiguredService) Rename ¶
func (UnconfiguredService) Rename(context.Context, string) error
func (UnconfiguredService) Status ¶
func (UnconfiguredService) Status(context.Context) (StatusResult, error)
func (UnconfiguredService) Usage ¶
func (UnconfiguredService) Usage(context.Context) (UsageResult, error)
type UsageError ¶
type UsageError struct{ Err error }
func (*UsageError) Error ¶
func (e *UsageError) Error() string
func (*UsageError) Unwrap ¶
func (e *UsageError) Unwrap() error
type VersionInfo ¶
Click to show internal directories.
Click to hide internal directories.