Documentation
¶
Overview ¶
Package alarmclock is a generated AlarmClock package.
Index ¶
- Constants
- type AlarmListVersion
- type AlarmPlayModeEnum
- type CreateAlarmArgs
- type CreateAlarmResponse
- type DailyIndexRefreshTime
- type DateFormat
- type DestroyAlarmArgs
- type DestroyAlarmResponse
- type GetDailyIndexRefreshTimeArgs
- type GetDailyIndexRefreshTimeResponse
- type GetFormatArgs
- type GetFormatResponse
- type GetHouseholdTimeAtStampArgs
- type GetHouseholdTimeAtStampResponse
- type GetTimeNowArgs
- type GetTimeNowResponse
- type GetTimeServerArgs
- type GetTimeServerResponse
- type GetTimeZoneAndRuleArgs
- type GetTimeZoneAndRuleResponse
- type GetTimeZoneArgs
- type GetTimeZoneResponse
- type GetTimeZoneRuleArgs
- type GetTimeZoneRuleResponse
- type ListAlarmsArgs
- type ListAlarmsResponse
- type Property
- type RecurrenceEnum
- type Service
- func (s *Service) Client() *http.Client
- func (s *Service) ControlEndpoint() *url.URL
- func (s *Service) CreateAlarm(args *CreateAlarmArgs) (*CreateAlarmResponse, error)
- func (s *Service) DestroyAlarm(args *DestroyAlarmArgs) (*DestroyAlarmResponse, error)
- func (s *Service) EventEndpoint() *url.URL
- func (s *Service) GetDailyIndexRefreshTime(args *GetDailyIndexRefreshTimeArgs) (*GetDailyIndexRefreshTimeResponse, error)
- func (s *Service) GetFormat(args *GetFormatArgs) (*GetFormatResponse, error)
- func (s *Service) GetHouseholdTimeAtStamp(args *GetHouseholdTimeAtStampArgs) (*GetHouseholdTimeAtStampResponse, error)
- func (s *Service) GetTimeNow(args *GetTimeNowArgs) (*GetTimeNowResponse, error)
- func (s *Service) GetTimeServer(args *GetTimeServerArgs) (*GetTimeServerResponse, error)
- func (s *Service) GetTimeZone(args *GetTimeZoneArgs) (*GetTimeZoneResponse, error)
- func (s *Service) GetTimeZoneAndRule(args *GetTimeZoneAndRuleArgs) (*GetTimeZoneAndRuleResponse, error)
- func (s *Service) GetTimeZoneRule(args *GetTimeZoneRuleArgs) (*GetTimeZoneRuleResponse, error)
- func (s *Service) ListAlarms(args *ListAlarmsArgs) (*ListAlarmsResponse, error)
- func (s *Service) Location() *url.URL
- func (zp *Service) ParseEvent(body []byte) []interface{}
- func (s *Service) SetDailyIndexRefreshTime(args *SetDailyIndexRefreshTimeArgs) (*SetDailyIndexRefreshTimeResponse, error)
- func (s *Service) SetFormat(args *SetFormatArgs) (*SetFormatResponse, error)
- func (s *Service) SetTimeNow(args *SetTimeNowArgs) (*SetTimeNowResponse, error)
- func (s *Service) SetTimeServer(args *SetTimeServerArgs) (*SetTimeServerResponse, error)
- func (s *Service) SetTimeZone(args *SetTimeZoneArgs) (*SetTimeZoneResponse, error)
- func (s *Service) UpdateAlarm(args *UpdateAlarmArgs) (*UpdateAlarmResponse, error)
- type ServiceOption
- type SetDailyIndexRefreshTimeArgs
- type SetDailyIndexRefreshTimeResponse
- type SetFormatArgs
- type SetFormatResponse
- type SetTimeNowArgs
- type SetTimeNowResponse
- type SetTimeServerArgs
- type SetTimeServerResponse
- type SetTimeZoneArgs
- type SetTimeZoneResponse
- type TimeFormat
- type TimeGeneration
- type TimeServer
- type TimeZone
- type UpdateAlarmArgs
- type UpdateAlarmResponse
- type UpnpEvent
Constants ¶
const ( ServiceURN = "urn:schemas-upnp-org:service:AlarmClock:1" EncodingSchema = "http://schemas.xmlsoap.org/soap/encoding/" EnvelopeSchema = "http://schemas.xmlsoap.org/soap/envelope/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmListVersion ¶
type AlarmListVersion string
type AlarmPlayModeEnum ¶
type AlarmPlayModeEnum string
const ( AlarmPlayMode_NORMAL AlarmPlayModeEnum = "NORMAL" AlarmPlayMode_REPEAT_ALL AlarmPlayModeEnum = "REPEAT_ALL" AlarmPlayMode_SHUFFLE_NOREPEAT AlarmPlayModeEnum = "SHUFFLE_NOREPEAT" AlarmPlayMode_SHUFFLE AlarmPlayModeEnum = "SHUFFLE" )
type CreateAlarmArgs ¶
type CreateAlarmArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
StartLocalTime string `xml:"StartLocalTime"`
Duration string `xml:"Duration"`
Recurrence RecurrenceEnum `xml:"Recurrence"`
Enabled bool `xml:"Enabled"`
RoomUUID string `xml:"RoomUUID"`
ProgramURI string `xml:"ProgramURI"`
ProgramMetaData string `xml:"ProgramMetaData"`
PlayMode AlarmPlayModeEnum `xml:"PlayMode"`
Volume uint16 `xml:"Volume"`
IncludeLinkedZones bool `xml:"IncludeLinkedZones"`
}
CreateAlarm Argument type.
type CreateAlarmResponse ¶
type CreateAlarmResponse struct {
AssignedID uint32 `xml:"AssignedID"`
}
CreateAlarm Response type.
type DailyIndexRefreshTime ¶
type DailyIndexRefreshTime string
type DateFormat ¶
type DateFormat string
type DestroyAlarmArgs ¶
DestroyAlarm Argument type.
type GetDailyIndexRefreshTimeArgs ¶
type GetDailyIndexRefreshTimeArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
}
GetDailyIndexRefreshTime Argument type.
type GetDailyIndexRefreshTimeResponse ¶
type GetDailyIndexRefreshTimeResponse struct {
CurrentDailyIndexRefreshTime string `xml:"CurrentDailyIndexRefreshTime"`
}
GetDailyIndexRefreshTime Response type.
type GetFormatArgs ¶
type GetFormatArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
}
GetFormat Argument type.
type GetFormatResponse ¶
type GetFormatResponse struct {
CurrentTimeFormat string `xml:"CurrentTimeFormat"`
CurrentDateFormat string `xml:"CurrentDateFormat"`
}
GetFormat Response type.
type GetHouseholdTimeAtStampArgs ¶
type GetHouseholdTimeAtStampArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
TimeStamp string `xml:"TimeStamp"`
}
GetHouseholdTimeAtStamp Argument type.
type GetHouseholdTimeAtStampResponse ¶
type GetHouseholdTimeAtStampResponse struct {
HouseholdUTCTime string `xml:"HouseholdUTCTime"`
}
GetHouseholdTimeAtStamp Response type.
type GetTimeNowArgs ¶
type GetTimeNowArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
}
GetTimeNow Argument type.
type GetTimeNowResponse ¶
type GetTimeNowResponse struct {
CurrentUTCTime string `xml:"CurrentUTCTime"`
CurrentLocalTime string `xml:"CurrentLocalTime"`
CurrentTimeZone string `xml:"CurrentTimeZone"`
CurrentTimeGeneration uint32 `xml:"CurrentTimeGeneration"`
}
GetTimeNow Response type.
type GetTimeServerArgs ¶
type GetTimeServerArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
}
GetTimeServer Argument type.
type GetTimeServerResponse ¶
type GetTimeServerResponse struct {
CurrentTimeServer string `xml:"CurrentTimeServer"`
}
GetTimeServer Response type.
type GetTimeZoneAndRuleArgs ¶
type GetTimeZoneAndRuleArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
}
GetTimeZoneAndRule Argument type.
type GetTimeZoneAndRuleResponse ¶
type GetTimeZoneAndRuleResponse struct {
Index int32 `xml:"Index"`
AutoAdjustDst bool `xml:"AutoAdjustDst"`
CurrentTimeZone string `xml:"CurrentTimeZone"`
}
GetTimeZoneAndRule Response type.
type GetTimeZoneArgs ¶
type GetTimeZoneArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
}
GetTimeZone Argument type.
type GetTimeZoneResponse ¶
type GetTimeZoneResponse struct {
Index int32 `xml:"Index"`
AutoAdjustDst bool `xml:"AutoAdjustDst"`
}
GetTimeZone Response type.
type GetTimeZoneRuleArgs ¶
GetTimeZoneRule Argument type.
type GetTimeZoneRuleResponse ¶
type GetTimeZoneRuleResponse struct {
TimeZone string `xml:"TimeZone"`
}
GetTimeZoneRule Response type.
type ListAlarmsArgs ¶
type ListAlarmsArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
}
ListAlarms Argument type.
type ListAlarmsResponse ¶
type ListAlarmsResponse struct {
CurrentAlarmList string `xml:"CurrentAlarmList"`
CurrentAlarmListVersion string `xml:"CurrentAlarmListVersion"`
}
ListAlarms Response type.
type Property ¶
type Property struct {
XMLName xml.Name `xml:"property"`
TimeZone *TimeZone `xml:"TimeZone"`
TimeServer *TimeServer `xml:"TimeServer"`
TimeGeneration *TimeGeneration `xml:"TimeGeneration"`
AlarmListVersion *AlarmListVersion `xml:"AlarmListVersion"`
DailyIndexRefreshTime *DailyIndexRefreshTime `xml:"DailyIndexRefreshTime"`
TimeFormat *TimeFormat `xml:"TimeFormat"`
DateFormat *DateFormat `xml:"DateFormat"`
}
Property represents a single property in a UPnP event notification.
type RecurrenceEnum ¶
type RecurrenceEnum string
Enumerations
const ( Recurrence_ONCE RecurrenceEnum = "ONCE" Recurrence_WEEKDAYS RecurrenceEnum = "WEEKDAYS" Recurrence_WEEKENDS RecurrenceEnum = "WEEKENDS" Recurrence_DAILY RecurrenceEnum = "DAILY" )
type Service ¶
type Service struct {
TimeZone *TimeZone
TimeServer *TimeServer
TimeGeneration *TimeGeneration
AlarmListVersion *AlarmListVersion
DailyIndexRefreshTime *DailyIndexRefreshTime
TimeFormat *TimeFormat
DateFormat *DateFormat
// contains filtered or unexported fields
}
Service represents AlarmClock service.
func NewService ¶
func NewService(opts ...ServiceOption) *Service
NewService creates a new instance of the AlarmClock service. You must provide at least a location URL and an HTTP client using the options.
func (*Service) ControlEndpoint ¶
ControlEndpoint returns the control endpoint URL of the service. This is usually a URL relative to the device's base URL.
func (*Service) CreateAlarm ¶
func (s *Service) CreateAlarm(args *CreateAlarmArgs) (*CreateAlarmResponse, error)
CreateAlarm calls the CreateAlarm action on the service.
func (*Service) DestroyAlarm ¶
func (s *Service) DestroyAlarm(args *DestroyAlarmArgs) (*DestroyAlarmResponse, error)
DestroyAlarm calls the DestroyAlarm action on the service.
func (*Service) EventEndpoint ¶
EventEndpoint returns the event endpoint URL of the service. This is usually a URL relative to the device's base URL.
func (*Service) GetDailyIndexRefreshTime ¶
func (s *Service) GetDailyIndexRefreshTime(args *GetDailyIndexRefreshTimeArgs) (*GetDailyIndexRefreshTimeResponse, error)
GetDailyIndexRefreshTime calls the GetDailyIndexRefreshTime action on the service.
func (*Service) GetFormat ¶
func (s *Service) GetFormat(args *GetFormatArgs) (*GetFormatResponse, error)
GetFormat calls the GetFormat action on the service.
func (*Service) GetHouseholdTimeAtStamp ¶
func (s *Service) GetHouseholdTimeAtStamp(args *GetHouseholdTimeAtStampArgs) (*GetHouseholdTimeAtStampResponse, error)
GetHouseholdTimeAtStamp calls the GetHouseholdTimeAtStamp action on the service.
func (*Service) GetTimeNow ¶
func (s *Service) GetTimeNow(args *GetTimeNowArgs) (*GetTimeNowResponse, error)
GetTimeNow calls the GetTimeNow action on the service.
func (*Service) GetTimeServer ¶
func (s *Service) GetTimeServer(args *GetTimeServerArgs) (*GetTimeServerResponse, error)
GetTimeServer calls the GetTimeServer action on the service.
func (*Service) GetTimeZone ¶
func (s *Service) GetTimeZone(args *GetTimeZoneArgs) (*GetTimeZoneResponse, error)
GetTimeZone calls the GetTimeZone action on the service.
func (*Service) GetTimeZoneAndRule ¶
func (s *Service) GetTimeZoneAndRule(args *GetTimeZoneAndRuleArgs) (*GetTimeZoneAndRuleResponse, error)
GetTimeZoneAndRule calls the GetTimeZoneAndRule action on the service.
func (*Service) GetTimeZoneRule ¶
func (s *Service) GetTimeZoneRule(args *GetTimeZoneRuleArgs) (*GetTimeZoneRuleResponse, error)
GetTimeZoneRule calls the GetTimeZoneRule action on the service.
func (*Service) ListAlarms ¶
func (s *Service) ListAlarms(args *ListAlarmsArgs) (*ListAlarmsResponse, error)
ListAlarms calls the ListAlarms action on the service.
func (*Service) ParseEvent ¶
ParseEvent parses a UPnP event notification and updates the service's state variables accordingly. It returns a slice of updated state variable values.
func (*Service) SetDailyIndexRefreshTime ¶
func (s *Service) SetDailyIndexRefreshTime(args *SetDailyIndexRefreshTimeArgs) (*SetDailyIndexRefreshTimeResponse, error)
SetDailyIndexRefreshTime calls the SetDailyIndexRefreshTime action on the service.
func (*Service) SetFormat ¶
func (s *Service) SetFormat(args *SetFormatArgs) (*SetFormatResponse, error)
SetFormat calls the SetFormat action on the service.
func (*Service) SetTimeNow ¶
func (s *Service) SetTimeNow(args *SetTimeNowArgs) (*SetTimeNowResponse, error)
SetTimeNow calls the SetTimeNow action on the service.
func (*Service) SetTimeServer ¶
func (s *Service) SetTimeServer(args *SetTimeServerArgs) (*SetTimeServerResponse, error)
SetTimeServer calls the SetTimeServer action on the service.
func (*Service) SetTimeZone ¶
func (s *Service) SetTimeZone(args *SetTimeZoneArgs) (*SetTimeZoneResponse, error)
SetTimeZone calls the SetTimeZone action on the service.
func (*Service) UpdateAlarm ¶
func (s *Service) UpdateAlarm(args *UpdateAlarmArgs) (*UpdateAlarmResponse, error)
UpdateAlarm calls the UpdateAlarm action on the service.
type ServiceOption ¶
type ServiceOption func(*Service)
func WithClient ¶
func WithClient(c *http.Client) ServiceOption
func WithLocation ¶
func WithLocation(u *url.URL) ServiceOption
type SetDailyIndexRefreshTimeArgs ¶
type SetDailyIndexRefreshTimeArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
DesiredDailyIndexRefreshTime string `xml:"DesiredDailyIndexRefreshTime"`
}
SetDailyIndexRefreshTime Argument type.
type SetDailyIndexRefreshTimeResponse ¶
type SetDailyIndexRefreshTimeResponse struct {
}
SetDailyIndexRefreshTime Response type.
type SetFormatArgs ¶
type SetFormatArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
DesiredTimeFormat string `xml:"DesiredTimeFormat"`
DesiredDateFormat string `xml:"DesiredDateFormat"`
}
SetFormat Argument type.
type SetTimeNowArgs ¶
type SetTimeNowArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
DesiredTime string `xml:"DesiredTime"`
TimeZoneForDesiredTime string `xml:"TimeZoneForDesiredTime"`
}
SetTimeNow Argument type.
type SetTimeServerArgs ¶
type SetTimeServerArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
DesiredTimeServer string `xml:"DesiredTimeServer"`
}
SetTimeServer Argument type.
type SetTimeZoneArgs ¶
type SetTimeZoneArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
Index int32 `xml:"Index"`
AutoAdjustDst bool `xml:"AutoAdjustDst"`
}
SetTimeZone Argument type.
type TimeFormat ¶
type TimeFormat string
type TimeGeneration ¶
type TimeGeneration uint32
type TimeServer ¶
type TimeServer string
type UpdateAlarmArgs ¶
type UpdateAlarmArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
ID uint32 `xml:"ID"`
StartLocalTime string `xml:"StartLocalTime"`
Duration string `xml:"Duration"`
Recurrence RecurrenceEnum `xml:"Recurrence"`
Enabled bool `xml:"Enabled"`
RoomUUID string `xml:"RoomUUID"`
ProgramURI string `xml:"ProgramURI"`
ProgramMetaData string `xml:"ProgramMetaData"`
PlayMode AlarmPlayModeEnum `xml:"PlayMode"`
Volume uint16 `xml:"Volume"`
IncludeLinkedZones bool `xml:"IncludeLinkedZones"`
}
UpdateAlarm Argument type.