Documentation
¶
Index ¶
- type Client
- type Error
- type Operation
- type Query
- type Server
- func (s *Server) AWS4Request() string
- func (s *Server) Accept() string
- func (s *Server) AcceptLanguage() string
- func (s *Server) ContentEncoding() string
- func (s *Server) ContentType() string
- func (s *Server) CreateClient(ctx context.Context, client *http.Client, ...) *Client
- func (s *Server) HMACAlgorithm() string
- func (s *Server) HostName() string
- func (s *Server) Marketplace() string
- func (s *Server) Region() string
- func (s *Server) ServiceName() string
- func (s *Server) URL(path string) *url.URL
- type ServerOptFunc
- type TimeStamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is http.Client for Aozora API Server
func DefaultClient ¶
DefaultClient returns new Client instance with default setting
func (*Client) Marketplace ¶
Marketplace returns name of Marketplace parameter for PA-API v5
func (*Client) PartnerTag ¶
PartnerTag returns PartnerTag parameter for PA-API v5
func (*Client) PartnerType ¶
PartnerType returns PartnerType parameter for PA-API v5
type Operation ¶
type Operation int
func (Operation) MarshalJSON ¶
MarshalJSON returns time string with RFC3339 format
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON returns result of Unmarshal for json.Unmarshal()
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is informations of Aozora API
func (*Server) AWS4Request ¶
AWS4Request returns AWS4Request parameter for PA-API v5
func (*Server) AcceptLanguage ¶
AcceptLanguage returns Accept-Language parameter for PA-API v5
func (*Server) ContentEncoding ¶
ContentEncoding returns Content-Encoding parameter for PA-API v5
func (*Server) ContentType ¶
ContentType returns Content-Type parameter for PA-API v5
func (*Server) CreateClient ¶
func (s *Server) CreateClient(ctx context.Context, client *http.Client, associateTag, accessKey, secretKey string) *Client
CreateClient returns new Client instance
func (*Server) HMACAlgorithm ¶
HMACAlgorithm returns HMAC-Algorithm parameter for PA-API v5
func (*Server) Marketplace ¶
Marketplace returns name of Marketplace parameter for PA-API v5
func (*Server) ServiceName ¶
ServiceName returns ServiceName parameter for PA-API v5
type ServerOptFunc ¶
type ServerOptFunc func(*Server)
ServerOptFunc is self-referential function for functional options pattern
func WithMarketplace ¶
func WithMarketplace(marketplace string) ServerOptFunc
WithMarketplace returns function for setting hostname
type TimeStamp ¶
TimeStamp is wrapper class of time.Time
func NewTimeStamp ¶
NewTimeStamp returns TimeStamp instance