Documentation ¶
Index ¶
- Variables
- func FormatDate(date time.Time) string
- func GetICS(now time.Time) (calendar *ics.Calendar, err error)
- func ParseText(text string) (result string, err error)
- func PrintError(err error) []byte
- func SanitizeDate(value string) (string, error)
- func SanitizeSMWDate(value string) (string, error)
- func SanitizeWikiText(value string) string
- type ApiResult
- type ApiResultEntry
- type ErrorResponse
- type EventsParameter
- type InvalidDateError
- type ParseParameter
- type ParseResponse
- type SMWResponse
- type SMWResponseMeta
- type SMWResponseResult
- type SMWResponseResultEntry
- type UpstreamError
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FormatDate ¶
func PrintError ¶
func SanitizeDate ¶
func SanitizeSMWDate ¶
func SanitizeWikiText ¶
Types ¶
type ApiResult ¶
type ApiResult struct { Results []ApiResultEntry `json:"results"` Version string `json:"version"` Meta SMWResponseMeta `json:"meta"` }
func ConvertApiResult ¶
func ConvertApiResult(response *SMWResponse) (result ApiResult, err error)
type ApiResultEntry ¶
type ApiResultEntry struct { Id string `json:"id"` Start int64 `json:"start"` End int64 `json:"end"` StartStr string `json:"startStr"` EndStr string `json:"endStr"` Title string `json:"title"` Desc string `json:"desc"` Url string `json:"url"` Icon string `json:"icon,omitempty"` Type []string `json:"type,omitempty"` Color string `json:"color,omitempty"` }
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type EventsParameter ¶
type InvalidDateError ¶
type InvalidDateError struct{}
func (*InvalidDateError) Error ¶
func (e *InvalidDateError) Error() string
type ParseParameter ¶
type ParseParameter struct { Action string `url:"action"` Format string `url:"format"` Text string `url:"text"` Prop string `url:"prop"` ContentModel string `url:"contentmodel"` Wrapoutputclass string `url:"wrapoutputclass"` Disablelimitreport int `url:"disablelimitreport"` Disableeditsection int `url:"disableeditsection"` Disabletoc int `url:"disabletoc"` }
type ParseResponse ¶
type SMWResponse ¶
type SMWResponse struct { Query struct { Results SMWResponseResult `json:"results"` Serializer string `json:"serializer"` Version int `json:"version"` Meta SMWResponseMeta `json:"meta"` } `json:"query"` }
type SMWResponseMeta ¶
type SMWResponseResult ¶
type SMWResponseResult struct {
Entries []SMWResponseResultEntry
}
func (*SMWResponseResult) UnmarshalJSON ¶
func (r *SMWResponseResult) UnmarshalJSON(data []byte) error
type SMWResponseResultEntry ¶
type SMWResponseResultEntry struct { Printouts struct { Type []string `json:"type"` Color []string `json:"color"` Name []string `json:"name"` Start []struct { Timestamp string `json:"timestamp"` Raw string `json:"raw"` } `json:"start"` End []struct { Timestamp string `json:"timestamp"` Raw string `json:"raw"` } `json:"end"` Desc []string `json:"desc"` Icon []struct { Fulltext string `json:"fulltext"` Fullurl string `json:"fullurl"` Namespace int `json:"namespace"` Exists string `json:"exists"` Displaytitle string `json:"displaytitle"` } `json:"icon"` } `json:"printouts"` Fulltext string `json:"fulltext"` Fullurl string `json:"fullurl"` Namespace int `json:"namespace"` Exists string `json:"exists"` Displaytitle string `json:"displaytitle"` }
type UpstreamError ¶
type UpstreamError struct{}
func (*UpstreamError) Error ¶
func (e *UpstreamError) Error() string
Click to show internal directories.
Click to hide internal directories.