sdjson

package
v0.0.0-...-d557dfe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2025 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package sdjson provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	AccessTokenScopes = "AccessToken.Scopes"
)

Variables

This section is empty.

Functions

func NewAddLineupRequest

func NewAddLineupRequest(server string, lineupId string) (*http.Request, error)

NewAddLineupRequest generates requests for AddLineup

func NewAvailableCountriesRequest

func NewAvailableCountriesRequest(server string) (*http.Request, error)

NewAvailableCountriesRequest generates requests for AvailableCountries

func NewDeleteLineupRequest

func NewDeleteLineupRequest(server string, lineupId string) (*http.Request, error)

NewDeleteLineupRequest generates requests for DeleteLineup

func NewHeadendsRequest

func NewHeadendsRequest(server string, params *HeadendsParams) (*http.Request, error)

NewHeadendsRequest generates requests for Headends

func NewLineupRequest

func NewLineupRequest(server string, lineupId string) (*http.Request, error)

NewLineupRequest generates requests for Lineup

func NewLineupsRequest

func NewLineupsRequest(server string) (*http.Request, error)

NewLineupsRequest generates requests for Lineups

func NewLoginRequest

func NewLoginRequest(server string, body LoginJSONRequestBody) (*http.Request, error)

NewLoginRequest calls the generic Login builder with application/json body

func NewLoginRequestWithBody

func NewLoginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewLoginRequestWithBody generates requests for Login with any type of body

func NewProgramsRequest

func NewProgramsRequest(server string, body ProgramsJSONRequestBody) (*http.Request, error)

NewProgramsRequest calls the generic Programs builder with application/json body

func NewProgramsRequestWithBody

func NewProgramsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewProgramsRequestWithBody generates requests for Programs with any type of body

func NewScheduleMD5Request

func NewScheduleMD5Request(server string, body ScheduleMD5JSONRequestBody) (*http.Request, error)

NewScheduleMD5Request calls the generic ScheduleMD5 builder with application/json body

func NewScheduleMD5RequestWithBody

func NewScheduleMD5RequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewScheduleMD5RequestWithBody generates requests for ScheduleMD5 with any type of body

func NewSchedulesRequest

func NewSchedulesRequest(server string, body SchedulesJSONRequestBody) (*http.Request, error)

NewSchedulesRequest calls the generic Schedules builder with application/json body

func NewSchedulesRequestWithBody

func NewSchedulesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSchedulesRequestWithBody generates requests for Schedules with any type of body

func NewStatusRequest

func NewStatusRequest(server string) (*http.Request, error)

NewStatusRequest generates requests for Status

Types

type Account

type Account struct {
	Expires    time.Time `json:"expires"`
	MaxLineups int       `json:"maxLineups"`
	Messages   *[]string `json:"messages,omitempty"`
}

Account defines model for Account.

type AddLineupResponse

type AddLineupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ModificationResponse
	JSONDefault  *ErrorResponse
}

func ParseAddLineupResponse

func ParseAddLineupResponse(rsp *http.Response) (*AddLineupResponse, error)

ParseAddLineupResponse parses an HTTP response from a AddLineupWithResponse call

func (AddLineupResponse) Status

func (r AddLineupResponse) Status() string

Status returns HTTPResponse.Status

func (AddLineupResponse) StatusCode

func (r AddLineupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Airing

type Airing struct {
	AirDateTime     time.Time `json:"airDateTime"`
	AudioProperties *[]string `json:"audioProperties,omitempty"`
	Duration        int       `json:"duration"`
	Md5             string    `json:"md5"`
	New             *bool     `json:"new,omitempty"`
	ProgramID       string    `json:"programID"`
	VideoProperties *[]string `json:"videoProperties,omitempty"`
}

Airing defines model for Airing.

type AuthResponse

type AuthResponse struct {
	Code     int       `json:"code"`
	Datetime time.Time `json:"datetime"`
	Message  string    `json:"message"`
	ServerID string    `json:"serverID"`
	Token    string    `json:"token"`
}

AuthResponse defines model for AuthResponse.

type AvailableCountries

type AvailableCountries map[string][]Country

AvailableCountries defines model for AvailableCountries.

type AvailableCountriesResponse

type AvailableCountriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AvailableCountries
	JSONDefault  *ErrorResponse
}

func ParseAvailableCountriesResponse

func ParseAvailableCountriesResponse(rsp *http.Response) (*AvailableCountriesResponse, error)

ParseAvailableCountriesResponse parses an HTTP response from a AvailableCountriesWithResponse call

func (AvailableCountriesResponse) Status

Status returns HTTPResponse.Status

func (AvailableCountriesResponse) StatusCode

func (r AvailableCountriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type BasicResponse

type BasicResponse struct {
	Code     int       `json:"code"`
	Datetime time.Time `json:"datetime"`
	Message  string    `json:"message"`
	ServerID string    `json:"serverID"`
}

BasicResponse defines model for BasicResponse.

type BasicResponseWithError

type BasicResponseWithError struct {
	Code     int       `json:"code"`
	Datetime time.Time `json:"datetime"`
	Message  string    `json:"message"`
	Response string    `json:"response"`
	ServerID string    `json:"serverID"`
}

BasicResponseWithError defines model for BasicResponseWithError.

type BatcherClient

type BatcherClient struct {
	ClientWithResponsesInterface
	// contains filtered or unexported fields
}

func NewBatcherClient

func NewBatcherClient(
	using ClientWithResponsesInterface,
	schedMD5PoolSize,
	schedMD5BatchSize,
	schedPoolSize,
	schedBatchSize,
	progPoolSize,
	progBatchSize int) BatcherClient

func (BatcherClient) ProgramsWithResponse

func (clnt BatcherClient) ProgramsWithResponse(ctx context.Context, body ProgramsJSONRequestBody, reqEditors ...RequestEditorFn) (*ProgramsResponse, error)

func (BatcherClient) ScheduleMD5WithResponse

func (clnt BatcherClient) ScheduleMD5WithResponse(ctx context.Context, ids []StationRequest, reqEditors ...RequestEditorFn) (*ScheduleMD5Response, error)

func (BatcherClient) SchedulesWithResponse

func (clnt BatcherClient) SchedulesWithResponse(ctx context.Context, body SchedulesJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesResponse, error)

type Broadcaster

type Broadcaster struct {
	City       *string `json:"city,omitempty"`
	Country    *string `json:"country,omitempty"`
	Postalcode *string `json:"postalcode,omitempty"`
	State      *string `json:"state,omitempty"`
}

Broadcaster defines model for Broadcaster.

type Channel

type Channel struct {
	AtscMajor        *int    `json:"atscMajor,omitempty"`
	AtscMinor        *int    `json:"atscMinor,omitempty"`
	Channel          *string `json:"channel,omitempty"`
	ChannelMajor     *string `json:"channelMajor,omitempty"`
	ChannelMinor     *string `json:"channelMinor,omitempty"`
	DeliverySystem   *string `json:"deliverySystem,omitempty"`
	Fec              *string `json:"fec,omitempty"`
	FrequencyHz      *int    `json:"frequencyHz,omitempty"`
	MatchType        *string `json:"matchType,omitempty"`
	ModulationSystem *string `json:"modulationSystem,omitempty"`
	NetworkID        *int    `json:"networkID,omitempty"`
	Polarization     *string `json:"polarization,omitempty"`
	ProviderCallsign *string `json:"providerCallsign,omitempty"`
	ServiceID        *int    `json:"serviceID,omitempty"`
	StationID        string  `json:"stationID"`
	Symbolrate       *int    `json:"symbolrate,omitempty"`
	TransportID      *int    `json:"transportID,omitempty"`
	UhfVhf           *int    `json:"uhfVhf,omitempty"`
	VirtualChannel   *string `json:"virtualChannel,omitempty"`
}

Channel defines model for Channel.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AddLineup

func (c *Client) AddLineup(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AvailableCountries

func (c *Client) AvailableCountries(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteLineup

func (c *Client) DeleteLineup(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Headends

func (c *Client) Headends(ctx context.Context, params *HeadendsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Lineup

func (c *Client) Lineup(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Lineups

func (c *Client) Lineups(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Login

func (c *Client) Login(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) LoginWithBody

func (c *Client) LoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Programs

func (c *Client) Programs(ctx context.Context, body ProgramsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ProgramsWithBody

func (c *Client) ProgramsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ScheduleMD5

func (c *Client) ScheduleMD5(ctx context.Context, body ScheduleMD5JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ScheduleMD5WithBody

func (c *Client) ScheduleMD5WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Schedules

func (c *Client) Schedules(ctx context.Context, body SchedulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SchedulesWithBody

func (c *Client) SchedulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Status

func (c *Client) Status(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// AvailableCountries request
	AvailableCountries(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Headends request
	Headends(ctx context.Context, params *HeadendsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Lineups request
	Lineups(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteLineup request
	DeleteLineup(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Lineup request
	Lineup(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddLineup request
	AddLineup(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ProgramsWithBody request with any body
	ProgramsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Programs(ctx context.Context, body ProgramsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SchedulesWithBody request with any body
	SchedulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Schedules(ctx context.Context, body SchedulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ScheduleMD5WithBody request with any body
	ScheduleMD5WithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ScheduleMD5(ctx context.Context, body ScheduleMD5JSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Status request
	Status(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LoginWithBody request with any body
	LoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Login(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func Login

func Login(server, username, password string, debug bool) *ClientWithResponses

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) AddLineupWithResponse

func (c *ClientWithResponses) AddLineupWithResponse(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*AddLineupResponse, error)

AddLineupWithResponse request returning *AddLineupResponse

func (*ClientWithResponses) AvailableCountriesWithResponse

func (c *ClientWithResponses) AvailableCountriesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AvailableCountriesResponse, error)

AvailableCountriesWithResponse request returning *AvailableCountriesResponse

func (*ClientWithResponses) DeleteLineupWithResponse

func (c *ClientWithResponses) DeleteLineupWithResponse(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*DeleteLineupResponse, error)

DeleteLineupWithResponse request returning *DeleteLineupResponse

func (*ClientWithResponses) HeadendsWithResponse

func (c *ClientWithResponses) HeadendsWithResponse(ctx context.Context, params *HeadendsParams, reqEditors ...RequestEditorFn) (*HeadendsResponse, error)

HeadendsWithResponse request returning *HeadendsResponse

func (*ClientWithResponses) LineupWithResponse

func (c *ClientWithResponses) LineupWithResponse(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*LineupResponse, error)

LineupWithResponse request returning *LineupResponse

func (*ClientWithResponses) LineupsWithResponse

func (c *ClientWithResponses) LineupsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LineupsResponse, error)

LineupsWithResponse request returning *LineupsResponse

func (*ClientWithResponses) LoginWithBodyWithResponse

func (c *ClientWithResponses) LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginResponse, error)

LoginWithBodyWithResponse request with arbitrary body returning *LoginResponse

func (*ClientWithResponses) LoginWithResponse

func (c *ClientWithResponses) LoginWithResponse(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginResponse, error)

func (*ClientWithResponses) ProgramsWithBodyWithResponse

func (c *ClientWithResponses) ProgramsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProgramsResponse, error)

ProgramsWithBodyWithResponse request with arbitrary body returning *ProgramsResponse

func (*ClientWithResponses) ProgramsWithResponse

func (c *ClientWithResponses) ProgramsWithResponse(ctx context.Context, body ProgramsJSONRequestBody, reqEditors ...RequestEditorFn) (*ProgramsResponse, error)

func (*ClientWithResponses) ScheduleMD5WithBodyWithResponse

func (c *ClientWithResponses) ScheduleMD5WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ScheduleMD5Response, error)

ScheduleMD5WithBodyWithResponse request with arbitrary body returning *ScheduleMD5Response

func (*ClientWithResponses) ScheduleMD5WithResponse

func (c *ClientWithResponses) ScheduleMD5WithResponse(ctx context.Context, body ScheduleMD5JSONRequestBody, reqEditors ...RequestEditorFn) (*ScheduleMD5Response, error)

func (*ClientWithResponses) SchedulesWithBodyWithResponse

func (c *ClientWithResponses) SchedulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesResponse, error)

SchedulesWithBodyWithResponse request with arbitrary body returning *SchedulesResponse

func (*ClientWithResponses) SchedulesWithResponse

func (c *ClientWithResponses) SchedulesWithResponse(ctx context.Context, body SchedulesJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesResponse, error)

func (*ClientWithResponses) StatusWithResponse

func (c *ClientWithResponses) StatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*StatusResponse, error)

StatusWithResponse request returning *StatusResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// AvailableCountriesWithResponse request
	AvailableCountriesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AvailableCountriesResponse, error)

	// HeadendsWithResponse request
	HeadendsWithResponse(ctx context.Context, params *HeadendsParams, reqEditors ...RequestEditorFn) (*HeadendsResponse, error)

	// LineupsWithResponse request
	LineupsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LineupsResponse, error)

	// DeleteLineupWithResponse request
	DeleteLineupWithResponse(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*DeleteLineupResponse, error)

	// LineupWithResponse request
	LineupWithResponse(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*LineupResponse, error)

	// AddLineupWithResponse request
	AddLineupWithResponse(ctx context.Context, lineupId string, reqEditors ...RequestEditorFn) (*AddLineupResponse, error)

	// ProgramsWithBodyWithResponse request with any body
	ProgramsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProgramsResponse, error)

	ProgramsWithResponse(ctx context.Context, body ProgramsJSONRequestBody, reqEditors ...RequestEditorFn) (*ProgramsResponse, error)

	// SchedulesWithBodyWithResponse request with any body
	SchedulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesResponse, error)

	SchedulesWithResponse(ctx context.Context, body SchedulesJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesResponse, error)

	// ScheduleMD5WithBodyWithResponse request with any body
	ScheduleMD5WithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ScheduleMD5Response, error)

	ScheduleMD5WithResponse(ctx context.Context, body ScheduleMD5JSONRequestBody, reqEditors ...RequestEditorFn) (*ScheduleMD5Response, error)

	// StatusWithResponse request
	StatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*StatusResponse, error)

	// LoginWithBodyWithResponse request with any body
	LoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginResponse, error)

	LoginWithResponse(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Country

type Country struct {
	FullName          string `json:"fullName"`
	OnePostalCode     *bool  `json:"onePostalCode,omitempty"`
	PostalCode        string `json:"postalCode"`
	PostalCodeExample string `json:"postalCodeExample"`
	ShortName         string `json:"shortName"`
}

Country defines model for Country.

type DeleteLineupResponse

type DeleteLineupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ModificationResponse
	JSONDefault  *ErrorResponse
}

func ParseDeleteLineupResponse

func ParseDeleteLineupResponse(rsp *http.Response) (*DeleteLineupResponse, error)

ParseDeleteLineupResponse parses an HTTP response from a DeleteLineupWithResponse call

func (DeleteLineupResponse) Status

func (r DeleteLineupResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteLineupResponse) StatusCode

func (r DeleteLineupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ErrorResponse

type ErrorResponse = BasicResponseWithError

ErrorResponse defines model for ErrorResponse.

type Headend

type Headend struct {
	Headend   string          `json:"headend"`
	Lineups   []HeadendLineup `json:"lineups"`
	Location  string          `json:"location"`
	Transport string          `json:"transport"`
}

Headend defines model for Headend.

type HeadendLineup

type HeadendLineup struct {
	Lineup string `json:"lineup"`
	Name   string `json:"name"`
	Uri    string `json:"uri"`
}

HeadendLineup defines model for HeadendLineup.

type HeadendsParams

type HeadendsParams struct {
	// Country three letter country code to search within
	Country string `form:"country" json:"country"`

	// Postalcode postal code to search for; must adhere to the rule returned from the country list
	Postalcode string `form:"postalcode" json:"postalcode"`
}

HeadendsParams defines parameters for Headends.

type HeadendsResponse

type HeadendsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Headend
	JSONDefault  *ErrorResponse
}

func ParseHeadendsResponse

func ParseHeadendsResponse(rsp *http.Response) (*HeadendsResponse, error)

ParseHeadendsResponse parses an HTTP response from a HeadendsWithResponse call

func (HeadendsResponse) Status

func (r HeadendsResponse) Status() string

Status returns HTTPResponse.Status

func (HeadendsResponse) StatusCode

func (r HeadendsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Lineup

type Lineup struct {
	IsDeleted *bool      `json:"isDeleted,omitempty"`
	Lineup    string     `json:"lineup"`
	Location  *string    `json:"location,omitempty"`
	Modified  *time.Time `json:"modified,omitempty"`
	Name      *string    `json:"name,omitempty"`
	Transport *string    `json:"transport,omitempty"`
	Uri       string     `json:"uri"`
}

Lineup defines model for Lineup.

type LineupDetails

type LineupDetails struct {
	Map      []Channel       `json:"map"`
	Metadata StationMetadata `json:"metadata"`
	Stations []Station       `json:"stations"`
}

LineupDetails defines model for LineupDetails.

type LineupResponse

type LineupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LineupDetails
	JSONDefault  *ErrorResponse
}

func ParseLineupResponse

func ParseLineupResponse(rsp *http.Response) (*LineupResponse, error)

ParseLineupResponse parses an HTTP response from a LineupWithResponse call

func (LineupResponse) Status

func (r LineupResponse) Status() string

Status returns HTTPResponse.Status

func (LineupResponse) StatusCode

func (r LineupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LineupsResponse

type LineupsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *UserLineups
	JSONDefault  *ErrorResponse
}

func ParseLineupsResponse

func ParseLineupsResponse(rsp *http.Response) (*LineupsResponse, error)

ParseLineupsResponse parses an HTTP response from a LineupsWithResponse call

func (LineupsResponse) Status

func (r LineupsResponse) Status() string

Status returns HTTPResponse.Status

func (LineupsResponse) StatusCode

func (r LineupsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LoginJSONRequestBody

type LoginJSONRequestBody = UserCreds

LoginJSONRequestBody defines body for Login for application/json ContentType.

type LoginResponse

type LoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AuthResponse
	JSONDefault  *ErrorResponse
}

func ParseLoginResponse

func ParseLoginResponse(rsp *http.Response) (*LoginResponse, error)

ParseLoginResponse parses an HTTP response from a LoginWithResponse call

func (LoginResponse) Status

func (r LoginResponse) Status() string

Status returns HTTPResponse.Status

func (LoginResponse) StatusCode

func (r LoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ModificationResponse

type ModificationResponse struct {
	ChangesRemaining int       `json:"changesRemaining"`
	Code             int       `json:"code"`
	Datetime         time.Time `json:"datetime"`
	Message          string    `json:"message"`
	Response         string    `json:"response"`
	ServerID         string    `json:"serverID"`
}

ModificationResponse defines model for ModificationResponse.

type Notification

type Notification = string

Notification defines model for Notification.

type Program

type Program struct {
	Cast                 *[]ProgramCredit       `json:"cast,omitempty"`
	ContentRating        *[]ProgramRating       `json:"contentRating,omitempty"`
	Country              *[]string              `json:"country,omitempty"`
	Crew                 *[]ProgramCredit       `json:"crew,omitempty"`
	Descriptions         *ProgramDescriptions   `json:"descriptions,omitempty"`
	Duration             int                    `json:"duration"`
	EntityType           string                 `json:"entityType"`
	EpisodeTitle150      *string                `json:"episodeTitle150,omitempty"`
	Genres               *[]string              `json:"genres,omitempty"`
	HasEpisodeArtwork    bool                   `json:"hasEpisodeArtwork"`
	HasImageArtwork      bool                   `json:"hasImageArtwork"`
	HasSeasonArtwork     bool                   `json:"hasSeasonArtwork"`
	HasSeriesArtwork     bool                   `json:"hasSeriesArtwork"`
	Hash                 string                 `json:"hash"`
	Md5                  string                 `json:"md5"`
	OriginalAirDate      *string                `json:"originalAirDate,omitempty"`
	ProgramID            string                 `json:"programID"`
	ResourceID           *string                `json:"resourceID,omitempty"`
	ShowType             string                 `json:"showType"`
	Titles               []ProgramTitle         `json:"titles"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

Program defines model for Program.

func (Program) Get

func (a Program) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for Program. Returns the specified element and whether it was found

func (Program) MarshalJSON

func (a Program) MarshalJSON() ([]byte, error)

Override default JSON handling for Program to handle AdditionalProperties

func (*Program) Set

func (a *Program) Set(fieldName string, value interface{})

Setter for additional properties for Program

func (*Program) UnmarshalJSON

func (a *Program) UnmarshalJSON(b []byte) error

Override default JSON handling for Program to handle AdditionalProperties

type ProgramCredit

type ProgramCredit struct {
	BillingOrder  string  `json:"billingOrder"`
	CharacterName *string `json:"characterName,omitempty"`
	Name          string  `json:"name"`
	NameId        *string `json:"nameId,omitempty"`
	PersonId      *string `json:"personId,omitempty"`
	Role          string  `json:"role"`
}

ProgramCredit defines model for ProgramCredit.

type ProgramDescription

type ProgramDescription struct {
	Description         string `json:"description"`
	DescriptionLanguage string `json:"descriptionLanguage"`
}

ProgramDescription defines model for ProgramDescription.

type ProgramDescriptions

type ProgramDescriptions struct {
	Description100  *[]ProgramDescription `json:"description100,omitempty"`
	Description1000 *[]ProgramDescription `json:"description1000,omitempty"`
}

ProgramDescriptions defines model for ProgramDescriptions.

type ProgramRating

type ProgramRating struct {
	Body             string    `json:"body"`
	Code             string    `json:"code"`
	ContentAdvistory *[]string `json:"contentAdvistory,omitempty"`
	ContentWarning   *[]string `json:"contentWarning,omitempty"`
	Country          string    `json:"country"`
}

ProgramRating defines model for ProgramRating.

type ProgramTitle

type ProgramTitle struct {
	Title120      string `json:"title120"`
	TitleLanguage string `json:"titleLanguage"`
}

ProgramTitle defines model for ProgramTitle.

type ProgramsJSONBody

type ProgramsJSONBody = []string

ProgramsJSONBody defines parameters for Programs.

type ProgramsJSONRequestBody

type ProgramsJSONRequestBody = ProgramsJSONBody

ProgramsJSONRequestBody defines body for Programs for application/json ContentType.

type ProgramsResponse

type ProgramsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Program
	JSONDefault  *ErrorResponse
}

func ParseProgramsResponse

func ParseProgramsResponse(rsp *http.Response) (*ProgramsResponse, error)

ParseProgramsResponse parses an HTTP response from a ProgramsWithResponse call

func (ProgramsResponse) Status

func (r ProgramsResponse) Status() string

Status returns HTTPResponse.Status

func (ProgramsResponse) StatusCode

func (r ProgramsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type Schedule

type Schedule struct {
	Metadata  ScheduleMetadata `json:"metadata"`
	Programs  *[]Airing        `json:"programs,omitempty"`
	StationID string           `json:"stationID"`
}

Schedule defines model for Schedule.

type ScheduleMD5JSONBody

type ScheduleMD5JSONBody = []StationRequest

ScheduleMD5JSONBody defines parameters for ScheduleMD5.

type ScheduleMD5JSONRequestBody

type ScheduleMD5JSONRequestBody = ScheduleMD5JSONBody

ScheduleMD5JSONRequestBody defines body for ScheduleMD5 for application/json ContentType.

type ScheduleMD5Response

type ScheduleMD5Response struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *map[string]map[string]StationStatus
	JSONDefault  *ErrorResponse
}

func ParseScheduleMD5Response

func ParseScheduleMD5Response(rsp *http.Response) (*ScheduleMD5Response, error)

ParseScheduleMD5Response parses an HTTP response from a ScheduleMD5WithResponse call

func (ScheduleMD5Response) Status

func (r ScheduleMD5Response) Status() string

Status returns HTTPResponse.Status

func (ScheduleMD5Response) StatusCode

func (r ScheduleMD5Response) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ScheduleMetadata

type ScheduleMetadata struct {
	Md5       *string    `json:"md5,omitempty"`
	Modified  *time.Time `json:"modified,omitempty"`
	StartDate *string    `json:"startDate,omitempty"`
}

ScheduleMetadata defines model for ScheduleMetadata.

type SchedulesJSONBody

type SchedulesJSONBody = []StationRequest

SchedulesJSONBody defines parameters for Schedules.

type SchedulesJSONRequestBody

type SchedulesJSONRequestBody = SchedulesJSONBody

SchedulesJSONRequestBody defines body for Schedules for application/json ContentType.

type SchedulesResponse

type SchedulesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Schedule
	JSONDefault  *ErrorResponse
}

func ParseSchedulesResponse

func ParseSchedulesResponse(rsp *http.Response) (*SchedulesResponse, error)

ParseSchedulesResponse parses an HTTP response from a SchedulesWithResponse call

func (SchedulesResponse) Status

func (r SchedulesResponse) Status() string

Status returns HTTPResponse.Status

func (SchedulesResponse) StatusCode

func (r SchedulesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Station

type Station struct {
	Affiliate           *string        `json:"affiliate,omitempty"`
	BroadcastLanguage   *[]string      `json:"broadcastLanguage,omitempty"`
	Broadcaster         *Broadcaster   `json:"broadcaster,omitempty"`
	Callsign            *string        `json:"callsign,omitempty"`
	DescriptionLanguage *[]string      `json:"descriptionLanguage,omitempty"`
	Name                *string        `json:"name,omitempty"`
	StationID           string         `json:"stationID"`
}

Station defines model for Station.

type StationLogo struct {
	URL      string  `json:"URL"`
	Category *string `json:"category,omitempty"`
	Height   *int    `json:"height,omitempty"`
	Md5      string  `json:"md5"`
	Source   *string `json:"source,omitempty"`
	Width    *int    `json:"width,omitempty"`
}

StationLogo defines model for StationLogo.

type StationMetadata

type StationMetadata struct {
	Lineup     string    `json:"lineup"`
	Modified   time.Time `json:"modified"`
	Modulation *string   `json:"modulation,omitempty"`
	Transport  *string   `json:"transport,omitempty"`
}

StationMetadata defines model for StationMetadata.

type StationRequest

type StationRequest struct {
	Date      *[]string `json:"date,omitempty"`
	StationID string    `json:"stationID"`
}

StationRequest defines model for StationRequest.

type StationStatus

type StationStatus struct {
	Code         int       `json:"code"`
	LastModified time.Time `json:"lastModified"`
	Md5          string    `json:"md5"`
	Message      string    `json:"message"`
}

StationStatus defines model for StationStatus.

type Status

type Status struct {
	Account        *Account        `json:"account,omitempty"`
	Code           *int            `json:"code,omitempty"`
	Datetime       *time.Time      `json:"datetime,omitempty"`
	LastDataUpdate *time.Time      `json:"lastDataUpdate,omitempty"`
	Lineups        *[]Lineup       `json:"lineups,omitempty"`
	Notifications  *[]Notification `json:"notifications,omitempty"`
	ServerID       *string         `json:"serverID,omitempty"`
	SystemStatus   *[]SystemStatus `json:"systemStatus,omitempty"`
}

Status defines model for Status.

type StatusResponse

type StatusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Status
	JSONDefault  *ErrorResponse
}

func ParseStatusResponse

func ParseStatusResponse(rsp *http.Response) (*StatusResponse, error)

ParseStatusResponse parses an HTTP response from a StatusWithResponse call

func (StatusResponse) Status

func (r StatusResponse) Status() string

Status returns HTTPResponse.Status

func (StatusResponse) StatusCode

func (r StatusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SystemStatus

type SystemStatus struct {
	Date    *time.Time `json:"date,omitempty"`
	Message *string    `json:"message,omitempty"`
	Status  *string    `json:"status,omitempty"`
}

SystemStatus defines model for SystemStatus.

type UserCreds

type UserCreds struct {
	// Password A SHA1 hash of the SD JSON password
	Password string `json:"password"`

	// Username SD JSON login id
	Username string `json:"username"`
}

UserCreds defines model for UserCreds.

type UserLineups

type UserLineups struct {
	Code     int       `json:"code"`
	Datetime time.Time `json:"datetime"`
	Lineups  []Lineup  `json:"lineups"`
	ServerID string    `json:"serverID"`
}

UserLineups defines model for UserLineups.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL