Documentation ¶
Index ¶
- Variables
- type Album
- func (p *Album) GetASIN() string
- func (p *Album) GetDuration() Minutes
- func (p *Album) GetTracks() []*Track
- func (p *Album) Read(iprot thrift.TProtocol) error
- func (p *Album) ReadField1(iprot thrift.TProtocol) error
- func (p *Album) ReadField2(iprot thrift.TProtocol) error
- func (p *Album) ReadField3(iprot thrift.TProtocol) error
- func (p *Album) String() string
- func (p *Album) Write(oprot thrift.TProtocol) error
- type AlbumWinnersErrorableSubscriber
- type AlbumWinnersPublisher
- type AlbumWinnersSubscriber
- type FStore
- type FStoreClient
- type FStoreProcessor
- type Minutes
- type PerfRightsOrg
- type PurchasingError
- func (p *PurchasingError) Error() string
- func (p *PurchasingError) GetErrorCode() int16
- func (p *PurchasingError) GetMessage() string
- func (p *PurchasingError) Read(iprot thrift.TProtocol) error
- func (p *PurchasingError) ReadField1(iprot thrift.TProtocol) error
- func (p *PurchasingError) ReadField2(iprot thrift.TProtocol) error
- func (p *PurchasingError) String() string
- func (p *PurchasingError) Write(oprot thrift.TProtocol) error
- type StoreBuyAlbumArgs
- func (p *StoreBuyAlbumArgs) GetASIN() string
- func (p *StoreBuyAlbumArgs) GetAcct() string
- func (p *StoreBuyAlbumArgs) Read(iprot thrift.TProtocol) error
- func (p *StoreBuyAlbumArgs) ReadField1(iprot thrift.TProtocol) error
- func (p *StoreBuyAlbumArgs) ReadField2(iprot thrift.TProtocol) error
- func (p *StoreBuyAlbumArgs) String() string
- func (p *StoreBuyAlbumArgs) Write(oprot thrift.TProtocol) error
- type StoreBuyAlbumResult
- func (p *StoreBuyAlbumResult) GetError() *PurchasingError
- func (p *StoreBuyAlbumResult) GetSuccess() *Album
- func (p *StoreBuyAlbumResult) IsSetError() bool
- func (p *StoreBuyAlbumResult) IsSetSuccess() bool
- func (p *StoreBuyAlbumResult) Read(iprot thrift.TProtocol) error
- func (p *StoreBuyAlbumResult) ReadField0(iprot thrift.TProtocol) error
- func (p *StoreBuyAlbumResult) ReadField1(iprot thrift.TProtocol) error
- func (p *StoreBuyAlbumResult) String() string
- func (p *StoreBuyAlbumResult) Write(oprot thrift.TProtocol) error
- type StoreEnterAlbumGiveawayArgs
- func (p *StoreEnterAlbumGiveawayArgs) GetEmail() string
- func (p *StoreEnterAlbumGiveawayArgs) GetName() string
- func (p *StoreEnterAlbumGiveawayArgs) Read(iprot thrift.TProtocol) error
- func (p *StoreEnterAlbumGiveawayArgs) ReadField1(iprot thrift.TProtocol) error
- func (p *StoreEnterAlbumGiveawayArgs) ReadField2(iprot thrift.TProtocol) error
- func (p *StoreEnterAlbumGiveawayArgs) String() string
- func (p *StoreEnterAlbumGiveawayArgs) Write(oprot thrift.TProtocol) error
- type StoreEnterAlbumGiveawayResult
- func (p *StoreEnterAlbumGiveawayResult) GetSuccess() bool
- func (p *StoreEnterAlbumGiveawayResult) IsSetSuccess() bool
- func (p *StoreEnterAlbumGiveawayResult) Read(iprot thrift.TProtocol) error
- func (p *StoreEnterAlbumGiveawayResult) ReadField0(iprot thrift.TProtocol) error
- func (p *StoreEnterAlbumGiveawayResult) String() string
- func (p *StoreEnterAlbumGiveawayResult) Write(oprot thrift.TProtocol) error
- type Track
- func (p *Track) GetArtist() string
- func (p *Track) GetComposer() string
- func (p *Track) GetDuration() Minutes
- func (p *Track) GetPro() PerfRightsOrg
- func (p *Track) GetPublisher() string
- func (p *Track) GetTitle() string
- func (p *Track) Read(iprot thrift.TProtocol) error
- func (p *Track) ReadField1(iprot thrift.TProtocol) error
- func (p *Track) ReadField2(iprot thrift.TProtocol) error
- func (p *Track) ReadField3(iprot thrift.TProtocol) error
- func (p *Track) ReadField4(iprot thrift.TProtocol) error
- func (p *Track) ReadField5(iprot thrift.TProtocol) error
- func (p *Track) ReadField6(iprot thrift.TProtocol) error
- func (p *Track) String() string
- func (p *Track) Write(oprot thrift.TProtocol) error
Constants ¶
This section is empty.
Variables ¶
var GoUnusedProtection__ int
var StoreEnterAlbumGiveawayResult_Success_DEFAULT bool
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { Tracks []*Track `thrift:"tracks,1" db:"tracks" json:"tracks"` Duration Minutes `thrift:"duration,2" db:"duration" json:"duration"` ASIN string `thrift:"ASIN,3" db:"ASIN" json:"ASIN"` }
The IDL provides set, list, and map types for representing collections of data. Our Album struct contains a list of Tracks.
var StoreBuyAlbumResult_Success_DEFAULT *Album
func (*Album) GetDuration ¶
type AlbumWinnersErrorableSubscriber ¶
type AlbumWinnersErrorableSubscriber interface { SubscribeContestStartErrorable(handler func(frugal.FContext, []*Album) error) (*frugal.FSubscription, error) SubscribeTimeLeftErrorable(handler func(frugal.FContext, Minutes) error) (*frugal.FSubscription, error) SubscribeWinnerErrorable(handler func(frugal.FContext, *Album) error) (*frugal.FSubscription, error) }
Scopes are a Frugal extension to the IDL for declaring PubSub semantics. Subscribers to this scope will be notified if they win a contest. Scopes must have a prefix.
func NewAlbumWinnersErrorableSubscriber ¶
func NewAlbumWinnersErrorableSubscriber(provider *frugal.FScopeProvider, middleware ...frugal.ServiceMiddleware) AlbumWinnersErrorableSubscriber
type AlbumWinnersPublisher ¶
type AlbumWinnersPublisher interface { Open() error Close() error PublishContestStart(ctx frugal.FContext, req []*Album) error PublishTimeLeft(ctx frugal.FContext, req Minutes) error PublishWinner(ctx frugal.FContext, req *Album) error }
Scopes are a Frugal extension to the IDL for declaring PubSub semantics. Subscribers to this scope will be notified if they win a contest. Scopes must have a prefix.
func NewAlbumWinnersPublisher ¶
func NewAlbumWinnersPublisher(provider *frugal.FScopeProvider, middleware ...frugal.ServiceMiddleware) AlbumWinnersPublisher
type AlbumWinnersSubscriber ¶
type AlbumWinnersSubscriber interface { SubscribeContestStart(handler func(frugal.FContext, []*Album)) (*frugal.FSubscription, error) SubscribeTimeLeft(handler func(frugal.FContext, Minutes)) (*frugal.FSubscription, error) SubscribeWinner(handler func(frugal.FContext, *Album)) (*frugal.FSubscription, error) }
Scopes are a Frugal extension to the IDL for declaring PubSub semantics. Subscribers to this scope will be notified if they win a contest. Scopes must have a prefix.
func NewAlbumWinnersSubscriber ¶
func NewAlbumWinnersSubscriber(provider *frugal.FScopeProvider, middleware ...frugal.ServiceMiddleware) AlbumWinnersSubscriber
type FStore ¶
type FStore interface { BuyAlbum(ctx frugal.FContext, ASIN string, acct string) (r *Album, err error) // Deprecated: use something else EnterAlbumGiveaway(ctx frugal.FContext, email string, name string) (r bool, err error) }
Services are the API for client and server interaction. Users can buy an album or enter a giveaway for a free album.
type FStoreClient ¶
type FStoreClient struct {
// contains filtered or unexported fields
}
Services are the API for client and server interaction. Users can buy an album or enter a giveaway for a free album.
func NewFStoreClient ¶
func NewFStoreClient(provider *frugal.FServiceProvider, middleware ...frugal.ServiceMiddleware) *FStoreClient
func (*FStoreClient) BuyAlbum ¶
func (f *FStoreClient) BuyAlbum(ctx frugal.FContext, asin string, acct string) (r *Album, err error)
func (*FStoreClient) EnterAlbumGiveaway
deprecated
func (f *FStoreClient) EnterAlbumGiveaway(ctx frugal.FContext, email string, name string) (r bool, err error)
Deprecated: use something else
type FStoreProcessor ¶
type FStoreProcessor struct {
*frugal.FBaseProcessor
}
func NewFStoreProcessor ¶
func NewFStoreProcessor(handler FStore, middleware ...frugal.ServiceMiddleware) *FStoreProcessor
type PerfRightsOrg ¶
type PerfRightsOrg int64
const ( PerfRightsOrg_ASCAP PerfRightsOrg = 1 PerfRightsOrg_BMI PerfRightsOrg = 2 PerfRightsOrg_SESAC PerfRightsOrg = 3 PerfRightsOrg_Other PerfRightsOrg = 4 )
func PerfRightsOrgFromString ¶
func PerfRightsOrgFromString(s string) (PerfRightsOrg, error)
func (PerfRightsOrg) MarshalText ¶
func (p PerfRightsOrg) MarshalText() ([]byte, error)
func (*PerfRightsOrg) Scan ¶
func (p *PerfRightsOrg) Scan(value interface{}) error
func (PerfRightsOrg) String ¶
func (p PerfRightsOrg) String() string
func (*PerfRightsOrg) UnmarshalText ¶
func (p *PerfRightsOrg) UnmarshalText(text []byte) error
type PurchasingError ¶
type PurchasingError struct { Message string `thrift:"message,1" db:"message" json:"message"` ErrorCode int16 `thrift:"error_code,2" db:"error_code" json:"error_code"` }
Exceptions are converted to the native format for each compiled language.
var StoreBuyAlbumResult_Error_DEFAULT *PurchasingError
func NewPurchasingError ¶
func NewPurchasingError() *PurchasingError
func (*PurchasingError) Error ¶
func (p *PurchasingError) Error() string
func (*PurchasingError) GetErrorCode ¶
func (p *PurchasingError) GetErrorCode() int16
func (*PurchasingError) GetMessage ¶
func (p *PurchasingError) GetMessage() string
func (*PurchasingError) ReadField1 ¶
func (p *PurchasingError) ReadField1(iprot thrift.TProtocol) error
func (*PurchasingError) ReadField2 ¶
func (p *PurchasingError) ReadField2(iprot thrift.TProtocol) error
func (*PurchasingError) String ¶
func (p *PurchasingError) String() string
type StoreBuyAlbumArgs ¶
type StoreBuyAlbumArgs struct { ASIN string `thrift:"ASIN,1" db:"ASIN" json:"ASIN"` Acct string `thrift:"acct,2" db:"acct" json:"acct"` }
func NewStoreBuyAlbumArgs ¶
func NewStoreBuyAlbumArgs() *StoreBuyAlbumArgs
func (*StoreBuyAlbumArgs) GetASIN ¶
func (p *StoreBuyAlbumArgs) GetASIN() string
func (*StoreBuyAlbumArgs) GetAcct ¶
func (p *StoreBuyAlbumArgs) GetAcct() string
func (*StoreBuyAlbumArgs) ReadField1 ¶
func (p *StoreBuyAlbumArgs) ReadField1(iprot thrift.TProtocol) error
func (*StoreBuyAlbumArgs) ReadField2 ¶
func (p *StoreBuyAlbumArgs) ReadField2(iprot thrift.TProtocol) error
func (*StoreBuyAlbumArgs) String ¶
func (p *StoreBuyAlbumArgs) String() string
type StoreBuyAlbumResult ¶
type StoreBuyAlbumResult struct { Success *Album `thrift:"success,0" db:"success" json:"success,omitempty"` Error *PurchasingError `thrift:"error,1" db:"error" json:"error,omitempty"` }
func NewStoreBuyAlbumResult ¶
func NewStoreBuyAlbumResult() *StoreBuyAlbumResult
func (*StoreBuyAlbumResult) GetError ¶
func (p *StoreBuyAlbumResult) GetError() *PurchasingError
func (*StoreBuyAlbumResult) GetSuccess ¶
func (p *StoreBuyAlbumResult) GetSuccess() *Album
func (*StoreBuyAlbumResult) IsSetError ¶
func (p *StoreBuyAlbumResult) IsSetError() bool
func (*StoreBuyAlbumResult) IsSetSuccess ¶
func (p *StoreBuyAlbumResult) IsSetSuccess() bool
func (*StoreBuyAlbumResult) ReadField0 ¶
func (p *StoreBuyAlbumResult) ReadField0(iprot thrift.TProtocol) error
func (*StoreBuyAlbumResult) ReadField1 ¶
func (p *StoreBuyAlbumResult) ReadField1(iprot thrift.TProtocol) error
func (*StoreBuyAlbumResult) String ¶
func (p *StoreBuyAlbumResult) String() string
type StoreEnterAlbumGiveawayArgs ¶
type StoreEnterAlbumGiveawayArgs struct { Email string `thrift:"email,1" db:"email" json:"email"` Name string `thrift:"name,2" db:"name" json:"name"` }
func NewStoreEnterAlbumGiveawayArgs ¶
func NewStoreEnterAlbumGiveawayArgs() *StoreEnterAlbumGiveawayArgs
func (*StoreEnterAlbumGiveawayArgs) GetEmail ¶
func (p *StoreEnterAlbumGiveawayArgs) GetEmail() string
func (*StoreEnterAlbumGiveawayArgs) GetName ¶
func (p *StoreEnterAlbumGiveawayArgs) GetName() string
func (*StoreEnterAlbumGiveawayArgs) Read ¶
func (p *StoreEnterAlbumGiveawayArgs) Read(iprot thrift.TProtocol) error
func (*StoreEnterAlbumGiveawayArgs) ReadField1 ¶
func (p *StoreEnterAlbumGiveawayArgs) ReadField1(iprot thrift.TProtocol) error
func (*StoreEnterAlbumGiveawayArgs) ReadField2 ¶
func (p *StoreEnterAlbumGiveawayArgs) ReadField2(iprot thrift.TProtocol) error
func (*StoreEnterAlbumGiveawayArgs) String ¶
func (p *StoreEnterAlbumGiveawayArgs) String() string
type StoreEnterAlbumGiveawayResult ¶
type StoreEnterAlbumGiveawayResult struct {
Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"`
}
func NewStoreEnterAlbumGiveawayResult ¶
func NewStoreEnterAlbumGiveawayResult() *StoreEnterAlbumGiveawayResult
func (*StoreEnterAlbumGiveawayResult) GetSuccess ¶
func (p *StoreEnterAlbumGiveawayResult) GetSuccess() bool
func (*StoreEnterAlbumGiveawayResult) IsSetSuccess ¶
func (p *StoreEnterAlbumGiveawayResult) IsSetSuccess() bool
func (*StoreEnterAlbumGiveawayResult) Read ¶
func (p *StoreEnterAlbumGiveawayResult) Read(iprot thrift.TProtocol) error
func (*StoreEnterAlbumGiveawayResult) ReadField0 ¶
func (p *StoreEnterAlbumGiveawayResult) ReadField0(iprot thrift.TProtocol) error
func (*StoreEnterAlbumGiveawayResult) String ¶
func (p *StoreEnterAlbumGiveawayResult) String() string
type Track ¶
type Track struct { Title string `thrift:"title,1" db:"title" json:"title"` Artist string `thrift:"artist,2" db:"artist" json:"artist"` Publisher string `thrift:"publisher,3" db:"publisher" json:"publisher"` Composer string `thrift:"composer,4" db:"composer" json:"composer"` Duration Minutes `thrift:"duration,5" db:"duration" json:"duration"` Pro PerfRightsOrg `thrift:"pro,6" db:"pro" json:"pro"` }
Comments (with an @ symbol) will be added to generated code.
func (*Track) GetComposer ¶
func (*Track) GetDuration ¶
func (*Track) GetPro ¶
func (p *Track) GetPro() PerfRightsOrg