mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-06 22:06:19 +02:00
add service interfaces
This commit is contained in:
parent
5fe884e59f
commit
af5e70a1d6
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Address interface {
|
||||||
|
LookupPostcode(*LookupPostcodeRequest) (*LookupPostcodeResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewAddressService(token string) *AddressService {
|
func NewAddressService(token string) *AddressService {
|
||||||
return &AddressService{
|
return &AddressService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Answer interface {
|
||||||
|
Question(*QuestionRequest) (*QuestionResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewAnswerService(token string) *AnswerService {
|
func NewAnswerService(token string) *AnswerService {
|
||||||
return &AnswerService{
|
return &AnswerService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,17 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type App interface {
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
Regions(*RegionsRequest) (*RegionsResponse, error)
|
||||||
|
Reserve(*ReserveRequest) (*ReserveResponse, error)
|
||||||
|
Resolve(*ResolveRequest) (*ResolveResponse, error)
|
||||||
|
Run(*RunRequest) (*RunResponse, error)
|
||||||
|
Status(*StatusRequest) (*StatusResponse, error)
|
||||||
|
Update(*UpdateRequest) (*UpdateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewAppService(token string) *AppService {
|
func NewAppService(token string) *AppService {
|
||||||
return &AppService{
|
return &AppService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Avatar interface {
|
||||||
|
Generate(*GenerateRequest) (*GenerateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewAvatarService(token string) *AvatarService {
|
func NewAvatarService(token string) *AvatarService {
|
||||||
return &AvatarService{
|
return &AvatarService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
8
services/cache/cache.go
vendored
8
services/cache/cache.go
vendored
@ -4,6 +4,14 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Cache interface {
|
||||||
|
Decrement(*DecrementRequest) (*DecrementResponse, error)
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
Get(*GetRequest) (*GetResponse, error)
|
||||||
|
Increment(*IncrementRequest) (*IncrementResponse, error)
|
||||||
|
Set(*SetRequest) (*SetResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewCacheService(token string) *CacheService {
|
func NewCacheService(token string) *CacheService {
|
||||||
return &CacheService{
|
return &CacheService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,14 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Contact interface {
|
||||||
|
Create(*CreateRequest) (*CreateResponse, error)
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
Read(*ReadRequest) (*ReadResponse, error)
|
||||||
|
Update(*UpdateRequest) (*UpdateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewContactService(token string) *ContactService {
|
func NewContactService(token string) *ContactService {
|
||||||
return &ContactService{
|
return &ContactService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Crypto interface {
|
||||||
|
History(*HistoryRequest) (*HistoryResponse, error)
|
||||||
|
News(*NewsRequest) (*NewsResponse, error)
|
||||||
|
Price(*PriceRequest) (*PriceResponse, error)
|
||||||
|
Quote(*QuoteRequest) (*QuoteResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewCryptoService(token string) *CryptoService {
|
func NewCryptoService(token string) *CryptoService {
|
||||||
return &CryptoService{
|
return &CryptoService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Currency interface {
|
||||||
|
Codes(*CodesRequest) (*CodesResponse, error)
|
||||||
|
Convert(*ConvertRequest) (*ConvertResponse, error)
|
||||||
|
History(*HistoryRequest) (*HistoryResponse, error)
|
||||||
|
Rates(*RatesRequest) (*RatesResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewCurrencyService(token string) *CurrencyService {
|
func NewCurrencyService(token string) *CurrencyService {
|
||||||
return &CurrencyService{
|
return &CurrencyService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,18 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Db interface {
|
||||||
|
Count(*CountRequest) (*CountResponse, error)
|
||||||
|
Create(*CreateRequest) (*CreateResponse, error)
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
DropTable(*DropTableRequest) (*DropTableResponse, error)
|
||||||
|
ListTables(*ListTablesRequest) (*ListTablesResponse, error)
|
||||||
|
Read(*ReadRequest) (*ReadResponse, error)
|
||||||
|
RenameTable(*RenameTableRequest) (*RenameTableResponse, error)
|
||||||
|
Truncate(*TruncateRequest) (*TruncateResponse, error)
|
||||||
|
Update(*UpdateRequest) (*UpdateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewDbService(token string) *DbService {
|
func NewDbService(token string) *DbService {
|
||||||
return &DbService{
|
return &DbService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Email interface {
|
||||||
|
Send(*SendRequest) (*SendResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewEmailService(token string) *EmailService {
|
func NewEmailService(token string) *EmailService {
|
||||||
return &EmailService{
|
return &EmailService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Emoji interface {
|
||||||
|
Find(*FindRequest) (*FindResponse, error)
|
||||||
|
Flag(*FlagRequest) (*FlagResponse, error)
|
||||||
|
Print(*PrintRequest) (*PrintResponse, error)
|
||||||
|
Send(*SendRequest) (*SendResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewEmojiService(token string) *EmojiService {
|
func NewEmojiService(token string) *EmojiService {
|
||||||
return &EmojiService{
|
return &EmojiService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Evchargers interface {
|
||||||
|
ReferenceData(*ReferenceDataRequest) (*ReferenceDataResponse, error)
|
||||||
|
Search(*SearchRequest) (*SearchResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewEvchargersService(token string) *EvchargersService {
|
func NewEvchargersService(token string) *EvchargersService {
|
||||||
return &EvchargersService{
|
return &EvchargersService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,12 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Event interface {
|
||||||
|
Consume(*ConsumeRequest) (*ConsumeResponseStream, error)
|
||||||
|
Publish(*PublishRequest) (*PublishResponse, error)
|
||||||
|
Read(*ReadRequest) (*ReadResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewEventService(token string) *EventService {
|
func NewEventService(token string) *EventService {
|
||||||
return &EventService{
|
return &EventService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type File interface {
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
Read(*ReadRequest) (*ReadResponse, error)
|
||||||
|
Save(*SaveRequest) (*SaveResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewFileService(token string) *FileService {
|
func NewFileService(token string) *FileService {
|
||||||
return &FileService{
|
return &FileService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,12 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Forex interface {
|
||||||
|
History(*HistoryRequest) (*HistoryResponse, error)
|
||||||
|
Price(*PriceRequest) (*PriceResponse, error)
|
||||||
|
Quote(*QuoteRequest) (*QuoteResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewForexService(token string) *ForexService {
|
func NewForexService(token string) *ForexService {
|
||||||
return &ForexService{
|
return &ForexService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,18 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Function interface {
|
||||||
|
Call(*CallRequest) (*CallResponse, error)
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
Deploy(*DeployRequest) (*DeployResponse, error)
|
||||||
|
Describe(*DescribeRequest) (*DescribeResponse, error)
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
Proxy(*ProxyRequest) (*ProxyResponse, error)
|
||||||
|
Regions(*RegionsRequest) (*RegionsResponse, error)
|
||||||
|
Reserve(*ReserveRequest) (*ReserveResponse, error)
|
||||||
|
Update(*UpdateRequest) (*UpdateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewFunctionService(token string) *FunctionService {
|
func NewFunctionService(token string) *FunctionService {
|
||||||
return &FunctionService{
|
return &FunctionService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Geocoding interface {
|
||||||
|
Lookup(*LookupRequest) (*LookupResponse, error)
|
||||||
|
Reverse(*ReverseRequest) (*ReverseResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewGeocodingService(token string) *GeocodingService {
|
func NewGeocodingService(token string) *GeocodingService {
|
||||||
return &GeocodingService{
|
return &GeocodingService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Gifs interface {
|
||||||
|
Search(*SearchRequest) (*SearchResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewGifsService(token string) *GifsService {
|
func NewGifsService(token string) *GifsService {
|
||||||
return &GifsService{
|
return &GifsService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Google interface {
|
||||||
|
Search(*SearchRequest) (*SearchResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewGoogleService(token string) *GoogleService {
|
func NewGoogleService(token string) *GoogleService {
|
||||||
return &GoogleService{
|
return &GoogleService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Helloworld interface {
|
||||||
|
Call(*CallRequest) (*CallResponse, error)
|
||||||
|
Stream(*StreamRequest) (*StreamResponseStream, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewHelloworldService(token string) *HelloworldService {
|
func NewHelloworldService(token string) *HelloworldService {
|
||||||
return &HelloworldService{
|
return &HelloworldService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Holidays interface {
|
||||||
|
Countries(*CountriesRequest) (*CountriesResponse, error)
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewHolidaysService(token string) *HolidaysService {
|
func NewHolidaysService(token string) *HolidaysService {
|
||||||
return &HolidaysService{
|
return &HolidaysService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Id interface {
|
||||||
|
Generate(*GenerateRequest) (*GenerateResponse, error)
|
||||||
|
Types(*TypesRequest) (*TypesResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewIdService(token string) *IdService {
|
func NewIdService(token string) *IdService {
|
||||||
return &IdService{
|
return &IdService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Image interface {
|
||||||
|
Convert(*ConvertRequest) (*ConvertResponse, error)
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
Resize(*ResizeRequest) (*ResizeResponse, error)
|
||||||
|
Upload(*UploadRequest) (*UploadResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewImageService(token string) *ImageService {
|
func NewImageService(token string) *ImageService {
|
||||||
return &ImageService{
|
return &ImageService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Ip interface {
|
||||||
|
Lookup(*LookupRequest) (*LookupResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewIpService(token string) *IpService {
|
func NewIpService(token string) *IpService {
|
||||||
return &IpService{
|
return &IpService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Joke interface {
|
||||||
|
Random(*RandomRequest) (*RandomResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewJokeService(token string) *JokeService {
|
func NewJokeService(token string) *JokeService {
|
||||||
return &JokeService{
|
return &JokeService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,12 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Location interface {
|
||||||
|
Read(*ReadRequest) (*ReadResponse, error)
|
||||||
|
Save(*SaveRequest) (*SaveResponse, error)
|
||||||
|
Search(*SearchRequest) (*SearchResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewLocationService(token string) *LocationService {
|
func NewLocationService(token string) *LocationService {
|
||||||
return &LocationService{
|
return &LocationService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Movie interface {
|
||||||
|
Search(*SearchRequest) (*SearchResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewMovieService(token string) *MovieService {
|
func NewMovieService(token string) *MovieService {
|
||||||
return &MovieService{
|
return &MovieService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Mq interface {
|
||||||
|
Publish(*PublishRequest) (*PublishResponse, error)
|
||||||
|
Subscribe(*SubscribeRequest) (*SubscribeResponseStream, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewMqService(token string) *MqService {
|
func NewMqService(token string) *MqService {
|
||||||
return &MqService{
|
return &MqService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type News interface {
|
||||||
|
Headlines(*HeadlinesRequest) (*HeadlinesResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewNewsService(token string) *NewsService {
|
func NewNewsService(token string) *NewsService {
|
||||||
return &NewsService{
|
return &NewsService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,12 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Nft interface {
|
||||||
|
Assets(*AssetsRequest) (*AssetsResponse, error)
|
||||||
|
Collections(*CollectionsRequest) (*CollectionsResponse, error)
|
||||||
|
Create(*CreateRequest) (*CreateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewNftService(token string) *NftService {
|
func NewNftService(token string) *NftService {
|
||||||
return &NftService{
|
return &NftService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,15 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Notes interface {
|
||||||
|
Create(*CreateRequest) (*CreateResponse, error)
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
Events(*EventsRequest) (*EventsResponseStream, error)
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
Read(*ReadRequest) (*ReadResponse, error)
|
||||||
|
Update(*UpdateRequest) (*UpdateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewNotesService(token string) *NotesService {
|
func NewNotesService(token string) *NotesService {
|
||||||
return &NotesService{
|
return &NotesService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Otp interface {
|
||||||
|
Generate(*GenerateRequest) (*GenerateResponse, error)
|
||||||
|
Validate(*ValidateRequest) (*ValidateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewOtpService(token string) *OtpService {
|
func NewOtpService(token string) *OtpService {
|
||||||
return &OtpService{
|
return &OtpService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,12 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Postcode interface {
|
||||||
|
Lookup(*LookupRequest) (*LookupResponse, error)
|
||||||
|
Random(*RandomRequest) (*RandomResponse, error)
|
||||||
|
Validate(*ValidateRequest) (*ValidateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewPostcodeService(token string) *PostcodeService {
|
func NewPostcodeService(token string) *PostcodeService {
|
||||||
return &PostcodeService{
|
return &PostcodeService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Prayer interface {
|
||||||
|
Times(*TimesRequest) (*TimesResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewPrayerService(token string) *PrayerService {
|
func NewPrayerService(token string) *PrayerService {
|
||||||
return &PrayerService{
|
return &PrayerService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Qr interface {
|
||||||
|
Generate(*GenerateRequest) (*GenerateResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewQrService(token string) *QrService {
|
func NewQrService(token string) *QrService {
|
||||||
return &QrService{
|
return &QrService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Quran interface {
|
||||||
|
Chapters(*ChaptersRequest) (*ChaptersResponse, error)
|
||||||
|
Search(*SearchRequest) (*SearchResponse, error)
|
||||||
|
Summary(*SummaryRequest) (*SummaryResponse, error)
|
||||||
|
Verses(*VersesRequest) (*VersesResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewQuranService(token string) *QuranService {
|
func NewQuranService(token string) *QuranService {
|
||||||
return &QuranService{
|
return &QuranService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,12 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Routing interface {
|
||||||
|
Directions(*DirectionsRequest) (*DirectionsResponse, error)
|
||||||
|
Eta(*EtaRequest) (*EtaResponse, error)
|
||||||
|
Route(*RouteRequest) (*RouteResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewRoutingService(token string) *RoutingService {
|
func NewRoutingService(token string) *RoutingService {
|
||||||
return &RoutingService{
|
return &RoutingService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Rss interface {
|
||||||
|
Add(*AddRequest) (*AddResponse, error)
|
||||||
|
Feed(*FeedRequest) (*FeedResponse, error)
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
Remove(*RemoveRequest) (*RemoveResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewRssService(token string) *RssService {
|
func NewRssService(token string) *RssService {
|
||||||
return &RssService{
|
return &RssService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Search interface {
|
||||||
|
Vote(*VoteRequest) (*VoteResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewSearchService(token string) *SearchService {
|
func NewSearchService(token string) *SearchService {
|
||||||
return &SearchService{
|
return &SearchService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Sentiment interface {
|
||||||
|
Analyze(*AnalyzeRequest) (*AnalyzeResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewSentimentService(token string) *SentimentService {
|
func NewSentimentService(token string) *SentimentService {
|
||||||
return &SentimentService{
|
return &SentimentService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Sms interface {
|
||||||
|
Send(*SendRequest) (*SendResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewSmsService(token string) *SmsService {
|
func NewSmsService(token string) *SmsService {
|
||||||
return &SmsService{
|
return &SmsService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,17 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Space interface {
|
||||||
|
Create(*CreateRequest) (*CreateResponse, error)
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
Download(*DownloadRequest) (*DownloadResponse, error)
|
||||||
|
Head(*HeadRequest) (*HeadResponse, error)
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
Read(*ReadRequest) (*ReadResponse, error)
|
||||||
|
Update(*UpdateRequest) (*UpdateResponse, error)
|
||||||
|
Upload(*UploadRequest) (*UploadResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewSpaceService(token string) *SpaceService {
|
func NewSpaceService(token string) *SpaceService {
|
||||||
return &SpaceService{
|
return &SpaceService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Spam interface {
|
||||||
|
Classify(*ClassifyRequest) (*ClassifyResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewSpamService(token string) *SpamService {
|
func NewSpamService(token string) *SpamService {
|
||||||
return &SpamService{
|
return &SpamService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Stock interface {
|
||||||
|
History(*HistoryRequest) (*HistoryResponse, error)
|
||||||
|
OrderBook(*OrderBookRequest) (*OrderBookResponse, error)
|
||||||
|
Price(*PriceRequest) (*PriceResponse, error)
|
||||||
|
Quote(*QuoteRequest) (*QuoteResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewStockService(token string) *StockService {
|
func NewStockService(token string) *StockService {
|
||||||
return &StockService{
|
return &StockService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Stream interface {
|
||||||
|
CreateChannel(*CreateChannelRequest) (*CreateChannelResponse, error)
|
||||||
|
ListChannels(*ListChannelsRequest) (*ListChannelsResponse, error)
|
||||||
|
ListMessages(*ListMessagesRequest) (*ListMessagesResponse, error)
|
||||||
|
SendMessage(*SendMessageRequest) (*SendMessageResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewStreamService(token string) *StreamService {
|
func NewStreamService(token string) *StreamService {
|
||||||
return &StreamService{
|
return &StreamService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Sunnah interface {
|
||||||
|
Books(*BooksRequest) (*BooksResponse, error)
|
||||||
|
Chapters(*ChaptersRequest) (*ChaptersResponse, error)
|
||||||
|
Collections(*CollectionsRequest) (*CollectionsResponse, error)
|
||||||
|
Hadiths(*HadithsRequest) (*HadithsResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewSunnahService(token string) *SunnahService {
|
func NewSunnahService(token string) *SunnahService {
|
||||||
return &SunnahService{
|
return &SunnahService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Thumbnail interface {
|
||||||
|
Screenshot(*ScreenshotRequest) (*ScreenshotResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewThumbnailService(token string) *ThumbnailService {
|
func NewThumbnailService(token string) *ThumbnailService {
|
||||||
return &ThumbnailService{
|
return &ThumbnailService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Time interface {
|
||||||
|
Now(*NowRequest) (*NowResponse, error)
|
||||||
|
Zone(*ZoneRequest) (*ZoneResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewTimeService(token string) *TimeService {
|
func NewTimeService(token string) *TimeService {
|
||||||
return &TimeService{
|
return &TimeService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Translate interface {
|
||||||
|
Text(*TextRequest) (*TextResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewTranslateService(token string) *TranslateService {
|
func NewTranslateService(token string) *TranslateService {
|
||||||
return &TranslateService{
|
return &TranslateService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,13 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Twitter interface {
|
||||||
|
Search(*SearchRequest) (*SearchResponse, error)
|
||||||
|
Timeline(*TimelineRequest) (*TimelineResponse, error)
|
||||||
|
Trends(*TrendsRequest) (*TrendsResponse, error)
|
||||||
|
User(*UserRequest) (*UserResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewTwitterService(token string) *TwitterService {
|
func NewTwitterService(token string) *TwitterService {
|
||||||
return &TwitterService{
|
return &TwitterService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,12 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Url interface {
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
Proxy(*ProxyRequest) (*ProxyResponse, error)
|
||||||
|
Shorten(*ShortenRequest) (*ShortenResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewUrlService(token string) *UrlService {
|
func NewUrlService(token string) *UrlService {
|
||||||
return &UrlService{
|
return &UrlService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,24 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type User interface {
|
||||||
|
Create(*CreateRequest) (*CreateResponse, error)
|
||||||
|
Delete(*DeleteRequest) (*DeleteResponse, error)
|
||||||
|
List(*ListRequest) (*ListResponse, error)
|
||||||
|
Login(*LoginRequest) (*LoginResponse, error)
|
||||||
|
Logout(*LogoutRequest) (*LogoutResponse, error)
|
||||||
|
Read(*ReadRequest) (*ReadResponse, error)
|
||||||
|
ReadSession(*ReadSessionRequest) (*ReadSessionResponse, error)
|
||||||
|
ResetPassword(*ResetPasswordRequest) (*ResetPasswordResponse, error)
|
||||||
|
SendMagicLink(*SendMagicLinkRequest) (*SendMagicLinkResponse, error)
|
||||||
|
SendPasswordResetEmail(*SendPasswordResetEmailRequest) (*SendPasswordResetEmailResponse, error)
|
||||||
|
SendVerificationEmail(*SendVerificationEmailRequest) (*SendVerificationEmailResponse, error)
|
||||||
|
UpdatePassword(*UpdatePasswordRequest) (*UpdatePasswordResponse, error)
|
||||||
|
Update(*UpdateRequest) (*UpdateResponse, error)
|
||||||
|
VerifyEmail(*VerifyEmailRequest) (*VerifyEmailResponse, error)
|
||||||
|
VerifyToken(*VerifyTokenRequest) (*VerifyTokenResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewUserService(token string) *UserService {
|
func NewUserService(token string) *UserService {
|
||||||
return &UserService{
|
return &UserService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,10 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Vehicle interface {
|
||||||
|
Lookup(*LookupRequest) (*LookupResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewVehicleService(token string) *VehicleService {
|
func NewVehicleService(token string) *VehicleService {
|
||||||
return &VehicleService{
|
return &VehicleService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Weather interface {
|
||||||
|
Forecast(*ForecastRequest) (*ForecastResponse, error)
|
||||||
|
Now(*NowRequest) (*NowResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewWeatherService(token string) *WeatherService {
|
func NewWeatherService(token string) *WeatherService {
|
||||||
return &WeatherService{
|
return &WeatherService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
@ -4,6 +4,11 @@ import (
|
|||||||
"go.m3o.com/client"
|
"go.m3o.com/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type Youtube interface {
|
||||||
|
Embed(*EmbedRequest) (*EmbedResponse, error)
|
||||||
|
Search(*SearchRequest) (*SearchResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
func NewYoutubeService(token string) *YoutubeService {
|
func NewYoutubeService(token string) *YoutubeService {
|
||||||
return &YoutubeService{
|
return &YoutubeService{
|
||||||
client: client.NewClient(&client.Options{
|
client: client.NewClient(&client.Options{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user