Documentation ¶
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type AccountEventsSubscriptionStatusOK
- func (s *AccountEventsSubscriptionStatusOK) Decode(d *jx.Decoder) error
- func (s *AccountEventsSubscriptionStatusOK) Encode(e *jx.Encoder)
- func (s *AccountEventsSubscriptionStatusOK) GetSubscribed() bool
- func (s *AccountEventsSubscriptionStatusOK) MarshalJSON() ([]byte, error)
- func (s *AccountEventsSubscriptionStatusOK) SetSubscribed(val bool)
- func (s *AccountEventsSubscriptionStatusOK) UnmarshalJSON(data []byte) error
- type AccountEventsSubscriptionStatusReq
- func (s *AccountEventsSubscriptionStatusReq) Decode(d *jx.Decoder) error
- func (s *AccountEventsSubscriptionStatusReq) Encode(e *jx.Encoder)
- func (s *AccountEventsSubscriptionStatusReq) GetAddress() string
- func (s *AccountEventsSubscriptionStatusReq) GetTwaInitData() string
- func (s *AccountEventsSubscriptionStatusReq) MarshalJSON() ([]byte, error)
- func (s *AccountEventsSubscriptionStatusReq) SetAddress(val string)
- func (s *AccountEventsSubscriptionStatusReq) SetTwaInitData(val string)
- func (s *AccountEventsSubscriptionStatusReq) UnmarshalJSON(data []byte) error
- type BridgeWebhookOK
- type BridgeWebhookParams
- type BridgeWebhookReq
- func (s *BridgeWebhookReq) Decode(d *jx.Decoder) error
- func (s *BridgeWebhookReq) Encode(e *jx.Encoder)
- func (s *BridgeWebhookReq) GetHash() string
- func (s *BridgeWebhookReq) GetTopic() string
- func (s *BridgeWebhookReq) MarshalJSON() ([]byte, error)
- func (s *BridgeWebhookReq) SetHash(val string)
- func (s *BridgeWebhookReq) SetTopic(val string)
- func (s *BridgeWebhookReq) UnmarshalJSON(data []byte) error
- type Client
- func (c *Client) AccountEventsSubscriptionStatus(ctx context.Context, request *AccountEventsSubscriptionStatusReq) (*AccountEventsSubscriptionStatusOK, error)
- func (c *Client) BridgeWebhook(ctx context.Context, request *BridgeWebhookReq, params BridgeWebhookParams) error
- func (c *Client) GetTonConnectPayload(ctx context.Context) (*GetTonConnectPayloadOK, error)
- func (c *Client) SubscribeToAccountEvents(ctx context.Context, request *SubscribeToAccountEventsReq) error
- func (c *Client) SubscribeToBridgeEvents(ctx context.Context, request *SubscribeToBridgeEventsReq) error
- func (c *Client) UnsubscribeFromAccountEvents(ctx context.Context, request *UnsubscribeFromAccountEventsReq) error
- func (c *Client) UnsubscribeFromBridgeEvents(ctx context.Context, request *UnsubscribeFromBridgeEventsReq) error
- type ClientOption
- type Error
- type ErrorHandler
- type ErrorStatusCode
- type GetTonConnectPayloadOK
- func (s *GetTonConnectPayloadOK) Decode(d *jx.Decoder) error
- func (s *GetTonConnectPayloadOK) Encode(e *jx.Encoder)
- func (s *GetTonConnectPayloadOK) GetPayload() string
- func (s *GetTonConnectPayloadOK) MarshalJSON() ([]byte, error)
- func (s *GetTonConnectPayloadOK) SetPayload(val string)
- func (s *GetTonConnectPayloadOK) UnmarshalJSON(data []byte) error
- type Handler
- type Invoker
- type Middleware
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type OptUint32
- func (o *OptUint32) Decode(d *jx.Decoder) error
- func (o OptUint32) Encode(e *jx.Encoder)
- func (o OptUint32) Get() (v uint32, ok bool)
- func (o OptUint32) IsSet() bool
- func (s OptUint32) MarshalJSON() ([]byte, error)
- func (o OptUint32) Or(d uint32) uint32
- func (o *OptUint32) Reset()
- func (o *OptUint32) SetTo(v uint32)
- func (s *OptUint32) UnmarshalJSON(data []byte) error
- type Option
- type Route
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type SubscribeToAccountEventsOK
- type SubscribeToAccountEventsReq
- func (s *SubscribeToAccountEventsReq) Decode(d *jx.Decoder) error
- func (s *SubscribeToAccountEventsReq) Encode(e *jx.Encoder)
- func (s *SubscribeToAccountEventsReq) GetAddress() string
- func (s *SubscribeToAccountEventsReq) GetProof() SubscribeToAccountEventsReqProof
- func (s *SubscribeToAccountEventsReq) GetTwaInitData() string
- func (s *SubscribeToAccountEventsReq) MarshalJSON() ([]byte, error)
- func (s *SubscribeToAccountEventsReq) SetAddress(val string)
- func (s *SubscribeToAccountEventsReq) SetProof(val SubscribeToAccountEventsReqProof)
- func (s *SubscribeToAccountEventsReq) SetTwaInitData(val string)
- func (s *SubscribeToAccountEventsReq) UnmarshalJSON(data []byte) error
- type SubscribeToAccountEventsReqProof
- func (s *SubscribeToAccountEventsReqProof) Decode(d *jx.Decoder) error
- func (s *SubscribeToAccountEventsReqProof) Encode(e *jx.Encoder)
- func (s *SubscribeToAccountEventsReqProof) GetDomain() SubscribeToAccountEventsReqProofDomain
- func (s *SubscribeToAccountEventsReqProof) GetPayload() string
- func (s *SubscribeToAccountEventsReqProof) GetSignature() string
- func (s *SubscribeToAccountEventsReqProof) GetStateInit() OptString
- func (s *SubscribeToAccountEventsReqProof) GetTimestamp() int64
- func (s *SubscribeToAccountEventsReqProof) MarshalJSON() ([]byte, error)
- func (s *SubscribeToAccountEventsReqProof) SetDomain(val SubscribeToAccountEventsReqProofDomain)
- func (s *SubscribeToAccountEventsReqProof) SetPayload(val string)
- func (s *SubscribeToAccountEventsReqProof) SetSignature(val string)
- func (s *SubscribeToAccountEventsReqProof) SetStateInit(val OptString)
- func (s *SubscribeToAccountEventsReqProof) SetTimestamp(val int64)
- func (s *SubscribeToAccountEventsReqProof) UnmarshalJSON(data []byte) error
- type SubscribeToAccountEventsReqProofDomain
- func (s *SubscribeToAccountEventsReqProofDomain) Decode(d *jx.Decoder) error
- func (s *SubscribeToAccountEventsReqProofDomain) Encode(e *jx.Encoder)
- func (s *SubscribeToAccountEventsReqProofDomain) GetLengthBytes() OptUint32
- func (s *SubscribeToAccountEventsReqProofDomain) GetValue() string
- func (s *SubscribeToAccountEventsReqProofDomain) MarshalJSON() ([]byte, error)
- func (s *SubscribeToAccountEventsReqProofDomain) SetLengthBytes(val OptUint32)
- func (s *SubscribeToAccountEventsReqProofDomain) SetValue(val string)
- func (s *SubscribeToAccountEventsReqProofDomain) UnmarshalJSON(data []byte) error
- type SubscribeToBridgeEventsOK
- type SubscribeToBridgeEventsReq
- func (s *SubscribeToBridgeEventsReq) Decode(d *jx.Decoder) error
- func (s *SubscribeToBridgeEventsReq) Encode(e *jx.Encoder)
- func (s *SubscribeToBridgeEventsReq) GetClientID() string
- func (s *SubscribeToBridgeEventsReq) GetOrigin() string
- func (s *SubscribeToBridgeEventsReq) GetTwaInitData() string
- func (s *SubscribeToBridgeEventsReq) MarshalJSON() ([]byte, error)
- func (s *SubscribeToBridgeEventsReq) SetClientID(val string)
- func (s *SubscribeToBridgeEventsReq) SetOrigin(val string)
- func (s *SubscribeToBridgeEventsReq) SetTwaInitData(val string)
- func (s *SubscribeToBridgeEventsReq) UnmarshalJSON(data []byte) error
- type UnimplementedHandler
- func (UnimplementedHandler) AccountEventsSubscriptionStatus(ctx context.Context, req *AccountEventsSubscriptionStatusReq) (r *AccountEventsSubscriptionStatusOK, _ error)
- func (UnimplementedHandler) BridgeWebhook(ctx context.Context, req *BridgeWebhookReq, params BridgeWebhookParams) error
- func (UnimplementedHandler) GetTonConnectPayload(ctx context.Context) (r *GetTonConnectPayloadOK, _ error)
- func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
- func (UnimplementedHandler) SubscribeToAccountEvents(ctx context.Context, req *SubscribeToAccountEventsReq) error
- func (UnimplementedHandler) SubscribeToBridgeEvents(ctx context.Context, req *SubscribeToBridgeEventsReq) error
- func (UnimplementedHandler) UnsubscribeFromAccountEvents(ctx context.Context, req *UnsubscribeFromAccountEventsReq) error
- func (UnimplementedHandler) UnsubscribeFromBridgeEvents(ctx context.Context, req *UnsubscribeFromBridgeEventsReq) error
- type UnsubscribeFromAccountEventsOK
- type UnsubscribeFromAccountEventsReq
- func (s *UnsubscribeFromAccountEventsReq) Decode(d *jx.Decoder) error
- func (s *UnsubscribeFromAccountEventsReq) Encode(e *jx.Encoder)
- func (s *UnsubscribeFromAccountEventsReq) GetTwaInitData() string
- func (s *UnsubscribeFromAccountEventsReq) MarshalJSON() ([]byte, error)
- func (s *UnsubscribeFromAccountEventsReq) SetTwaInitData(val string)
- func (s *UnsubscribeFromAccountEventsReq) UnmarshalJSON(data []byte) error
- type UnsubscribeFromBridgeEventsOK
- type UnsubscribeFromBridgeEventsReq
- func (s *UnsubscribeFromBridgeEventsReq) Decode(d *jx.Decoder) error
- func (s *UnsubscribeFromBridgeEventsReq) Encode(e *jx.Encoder)
- func (s *UnsubscribeFromBridgeEventsReq) GetClientID() OptString
- func (s *UnsubscribeFromBridgeEventsReq) GetTwaInitData() string
- func (s *UnsubscribeFromBridgeEventsReq) MarshalJSON() ([]byte, error)
- func (s *UnsubscribeFromBridgeEventsReq) SetClientID(val OptString)
- func (s *UnsubscribeFromBridgeEventsReq) SetTwaInitData(val string)
- func (s *UnsubscribeFromBridgeEventsReq) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountEventsSubscriptionStatusOK ¶
type AccountEventsSubscriptionStatusOK struct {
Subscribed bool `json:"subscribed"`
}
func (*AccountEventsSubscriptionStatusOK) Decode ¶
func (s *AccountEventsSubscriptionStatusOK) Decode(d *jx.Decoder) error
Decode decodes AccountEventsSubscriptionStatusOK from json.
func (*AccountEventsSubscriptionStatusOK) Encode ¶
func (s *AccountEventsSubscriptionStatusOK) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AccountEventsSubscriptionStatusOK) GetSubscribed ¶
func (s *AccountEventsSubscriptionStatusOK) GetSubscribed() bool
GetSubscribed returns the value of Subscribed.
func (*AccountEventsSubscriptionStatusOK) MarshalJSON ¶
func (s *AccountEventsSubscriptionStatusOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AccountEventsSubscriptionStatusOK) SetSubscribed ¶
func (s *AccountEventsSubscriptionStatusOK) SetSubscribed(val bool)
SetSubscribed sets the value of Subscribed.
func (*AccountEventsSubscriptionStatusOK) UnmarshalJSON ¶
func (s *AccountEventsSubscriptionStatusOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type AccountEventsSubscriptionStatusReq ¶
type AccountEventsSubscriptionStatusReq struct { // Base64 encoded twa init data. TwaInitData string `json:"twa_init_data"` // Wallet or smart contract address. Address string `json:"address"` }
func (*AccountEventsSubscriptionStatusReq) Decode ¶
func (s *AccountEventsSubscriptionStatusReq) Decode(d *jx.Decoder) error
Decode decodes AccountEventsSubscriptionStatusReq from json.
func (*AccountEventsSubscriptionStatusReq) Encode ¶
func (s *AccountEventsSubscriptionStatusReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*AccountEventsSubscriptionStatusReq) GetAddress ¶
func (s *AccountEventsSubscriptionStatusReq) GetAddress() string
GetAddress returns the value of Address.
func (*AccountEventsSubscriptionStatusReq) GetTwaInitData ¶
func (s *AccountEventsSubscriptionStatusReq) GetTwaInitData() string
GetTwaInitData returns the value of TwaInitData.
func (*AccountEventsSubscriptionStatusReq) MarshalJSON ¶
func (s *AccountEventsSubscriptionStatusReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*AccountEventsSubscriptionStatusReq) SetAddress ¶
func (s *AccountEventsSubscriptionStatusReq) SetAddress(val string)
SetAddress sets the value of Address.
func (*AccountEventsSubscriptionStatusReq) SetTwaInitData ¶
func (s *AccountEventsSubscriptionStatusReq) SetTwaInitData(val string)
SetTwaInitData sets the value of TwaInitData.
func (*AccountEventsSubscriptionStatusReq) UnmarshalJSON ¶
func (s *AccountEventsSubscriptionStatusReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type BridgeWebhookOK ¶
type BridgeWebhookOK struct{}
BridgeWebhookOK is response for BridgeWebhook operation.
type BridgeWebhookParams ¶
type BridgeWebhookParams struct {
ClientID string
}
BridgeWebhookParams is parameters of bridgeWebhook operation.
type BridgeWebhookReq ¶
func (*BridgeWebhookReq) Decode ¶
func (s *BridgeWebhookReq) Decode(d *jx.Decoder) error
Decode decodes BridgeWebhookReq from json.
func (*BridgeWebhookReq) Encode ¶
func (s *BridgeWebhookReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*BridgeWebhookReq) GetHash ¶
func (s *BridgeWebhookReq) GetHash() string
GetHash returns the value of Hash.
func (*BridgeWebhookReq) GetTopic ¶
func (s *BridgeWebhookReq) GetTopic() string
GetTopic returns the value of Topic.
func (*BridgeWebhookReq) MarshalJSON ¶
func (s *BridgeWebhookReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*BridgeWebhookReq) SetHash ¶
func (s *BridgeWebhookReq) SetHash(val string)
SetHash sets the value of Hash.
func (*BridgeWebhookReq) SetTopic ¶
func (s *BridgeWebhookReq) SetTopic(val string)
SetTopic sets the value of Topic.
func (*BridgeWebhookReq) UnmarshalJSON ¶
func (s *BridgeWebhookReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) AccountEventsSubscriptionStatus ¶
func (c *Client) AccountEventsSubscriptionStatus(ctx context.Context, request *AccountEventsSubscriptionStatusReq) (*AccountEventsSubscriptionStatusOK, error)
AccountEventsSubscriptionStatus invokes accountEventsSubscriptionStatus operation.
Get a status of an account-events subscription.
POST /account-events/subscription-status
func (*Client) BridgeWebhook ¶
func (c *Client) BridgeWebhook(ctx context.Context, request *BridgeWebhookReq, params BridgeWebhookParams) error
BridgeWebhook invokes bridgeWebhook operation.
Webhook called by the HTTP Bridge when an event occurs.
POST /bridge/webhook/{client_id}
func (*Client) GetTonConnectPayload ¶
func (c *Client) GetTonConnectPayload(ctx context.Context) (*GetTonConnectPayloadOK, error)
GetTonConnectPayload invokes getTonConnectPayload operation.
Get a challenge for TON Connect.
GET /tonconnect/payload
func (*Client) SubscribeToAccountEvents ¶
func (c *Client) SubscribeToAccountEvents(ctx context.Context, request *SubscribeToAccountEventsReq) error
SubscribeToAccountEvents invokes subscribeToAccountEvents operation.
Subscribe to notifications about events in the TON blockchain for a specific address.
POST /account-events/subscribe
func (*Client) SubscribeToBridgeEvents ¶
func (c *Client) SubscribeToBridgeEvents(ctx context.Context, request *SubscribeToBridgeEventsReq) error
SubscribeToBridgeEvents invokes subscribeToBridgeEvents operation.
Subscribe to notifications from the HTTP Bridge regarding a specific smart contract or wallet.
POST /bridge/subscribe
func (*Client) UnsubscribeFromAccountEvents ¶
func (c *Client) UnsubscribeFromAccountEvents(ctx context.Context, request *UnsubscribeFromAccountEventsReq) error
UnsubscribeFromAccountEvents invokes unsubscribeFromAccountEvents operation.
Unsubscribe from notifications about events in the TON blockchain for a specific address.
POST /account-events/unsubscribe
func (*Client) UnsubscribeFromBridgeEvents ¶
func (c *Client) UnsubscribeFromBridgeEvents(ctx context.Context, request *UnsubscribeFromBridgeEventsReq) error
UnsubscribeFromBridgeEvents invokes unsubscribeFromBridgeEvents operation.
Unsubscribe from bridge notifications.
POST /bridge/unsubscribe
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type Error ¶
type Error struct {
Error string `json:"error"`
}
func (*Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorStatusCode ¶
ErrorStatusCode wraps Error with StatusCode.
func (*ErrorStatusCode) Error ¶
func (s *ErrorStatusCode) Error() string
func (*ErrorStatusCode) GetResponse ¶
func (s *ErrorStatusCode) GetResponse() Error
GetResponse returns the value of Response.
func (*ErrorStatusCode) GetStatusCode ¶
func (s *ErrorStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*ErrorStatusCode) SetResponse ¶
func (s *ErrorStatusCode) SetResponse(val Error)
SetResponse sets the value of Response.
func (*ErrorStatusCode) SetStatusCode ¶
func (s *ErrorStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type GetTonConnectPayloadOK ¶
type GetTonConnectPayloadOK struct {
Payload string `json:"payload"`
}
func (*GetTonConnectPayloadOK) Decode ¶
func (s *GetTonConnectPayloadOK) Decode(d *jx.Decoder) error
Decode decodes GetTonConnectPayloadOK from json.
func (*GetTonConnectPayloadOK) Encode ¶
func (s *GetTonConnectPayloadOK) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*GetTonConnectPayloadOK) GetPayload ¶
func (s *GetTonConnectPayloadOK) GetPayload() string
GetPayload returns the value of Payload.
func (*GetTonConnectPayloadOK) MarshalJSON ¶
func (s *GetTonConnectPayloadOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GetTonConnectPayloadOK) SetPayload ¶
func (s *GetTonConnectPayloadOK) SetPayload(val string)
SetPayload sets the value of Payload.
func (*GetTonConnectPayloadOK) UnmarshalJSON ¶
func (s *GetTonConnectPayloadOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface { // AccountEventsSubscriptionStatus implements accountEventsSubscriptionStatus operation. // // Get a status of an account-events subscription. // // POST /account-events/subscription-status AccountEventsSubscriptionStatus(ctx context.Context, req *AccountEventsSubscriptionStatusReq) (*AccountEventsSubscriptionStatusOK, error) // BridgeWebhook implements bridgeWebhook operation. // // Webhook called by the HTTP Bridge when an event occurs. // // POST /bridge/webhook/{client_id} BridgeWebhook(ctx context.Context, req *BridgeWebhookReq, params BridgeWebhookParams) error // GetTonConnectPayload implements getTonConnectPayload operation. // // Get a challenge for TON Connect. // // GET /tonconnect/payload GetTonConnectPayload(ctx context.Context) (*GetTonConnectPayloadOK, error) // SubscribeToAccountEvents implements subscribeToAccountEvents operation. // // Subscribe to notifications about events in the TON blockchain for a specific address. // // POST /account-events/subscribe SubscribeToAccountEvents(ctx context.Context, req *SubscribeToAccountEventsReq) error // SubscribeToBridgeEvents implements subscribeToBridgeEvents operation. // // Subscribe to notifications from the HTTP Bridge regarding a specific smart contract or wallet. // // POST /bridge/subscribe SubscribeToBridgeEvents(ctx context.Context, req *SubscribeToBridgeEventsReq) error // UnsubscribeFromAccountEvents implements unsubscribeFromAccountEvents operation. // // Unsubscribe from notifications about events in the TON blockchain for a specific address. // // POST /account-events/unsubscribe UnsubscribeFromAccountEvents(ctx context.Context, req *UnsubscribeFromAccountEventsReq) error // UnsubscribeFromBridgeEvents implements unsubscribeFromBridgeEvents operation. // // Unsubscribe from bridge notifications. // // POST /bridge/unsubscribe UnsubscribeFromBridgeEvents(ctx context.Context, req *UnsubscribeFromBridgeEventsReq) error // NewError creates *ErrorStatusCode from error returned by handler. // // Used for common default response. NewError(ctx context.Context, err error) *ErrorStatusCode }
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶
type Invoker interface { // AccountEventsSubscriptionStatus invokes accountEventsSubscriptionStatus operation. // // Get a status of an account-events subscription. // // POST /account-events/subscription-status AccountEventsSubscriptionStatus(ctx context.Context, request *AccountEventsSubscriptionStatusReq) (*AccountEventsSubscriptionStatusOK, error) // BridgeWebhook invokes bridgeWebhook operation. // // Webhook called by the HTTP Bridge when an event occurs. // // POST /bridge/webhook/{client_id} BridgeWebhook(ctx context.Context, request *BridgeWebhookReq, params BridgeWebhookParams) error // GetTonConnectPayload invokes getTonConnectPayload operation. // // Get a challenge for TON Connect. // // GET /tonconnect/payload GetTonConnectPayload(ctx context.Context) (*GetTonConnectPayloadOK, error) // SubscribeToAccountEvents invokes subscribeToAccountEvents operation. // // Subscribe to notifications about events in the TON blockchain for a specific address. // // POST /account-events/subscribe SubscribeToAccountEvents(ctx context.Context, request *SubscribeToAccountEventsReq) error // SubscribeToBridgeEvents invokes subscribeToBridgeEvents operation. // // Subscribe to notifications from the HTTP Bridge regarding a specific smart contract or wallet. // // POST /bridge/subscribe SubscribeToBridgeEvents(ctx context.Context, request *SubscribeToBridgeEventsReq) error // UnsubscribeFromAccountEvents invokes unsubscribeFromAccountEvents operation. // // Unsubscribe from notifications about events in the TON blockchain for a specific address. // // POST /account-events/unsubscribe UnsubscribeFromAccountEvents(ctx context.Context, request *UnsubscribeFromAccountEventsReq) error // UnsubscribeFromBridgeEvents invokes unsubscribeFromBridgeEvents operation. // // Unsubscribe from bridge notifications. // // POST /bridge/unsubscribe UnsubscribeFromBridgeEvents(ctx context.Context, request *UnsubscribeFromBridgeEventsReq) error }
Invoker invokes operations described by OpenAPI v3 specification.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptUint32 ¶
OptUint32 is optional uint32.
func NewOptUint32 ¶
NewOptUint32 returns new OptUint32 with value set to v.
func (OptUint32) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptUint32) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface { ServerOption ClientOption }
Option is config option.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type SubscribeToAccountEventsOK ¶
type SubscribeToAccountEventsOK struct{}
SubscribeToAccountEventsOK is response for SubscribeToAccountEvents operation.
type SubscribeToAccountEventsReq ¶
type SubscribeToAccountEventsReq struct { // Base64 encoded twa init data. TwaInitData string `json:"twa_init_data"` // Wallet or smart contract address. Address string `json:"address"` // TON Connect proof of ownership of the address. Proof SubscribeToAccountEventsReqProof `json:"proof"` }
func (*SubscribeToAccountEventsReq) Decode ¶
func (s *SubscribeToAccountEventsReq) Decode(d *jx.Decoder) error
Decode decodes SubscribeToAccountEventsReq from json.
func (*SubscribeToAccountEventsReq) Encode ¶
func (s *SubscribeToAccountEventsReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SubscribeToAccountEventsReq) GetAddress ¶
func (s *SubscribeToAccountEventsReq) GetAddress() string
GetAddress returns the value of Address.
func (*SubscribeToAccountEventsReq) GetProof ¶
func (s *SubscribeToAccountEventsReq) GetProof() SubscribeToAccountEventsReqProof
GetProof returns the value of Proof.
func (*SubscribeToAccountEventsReq) GetTwaInitData ¶
func (s *SubscribeToAccountEventsReq) GetTwaInitData() string
GetTwaInitData returns the value of TwaInitData.
func (*SubscribeToAccountEventsReq) MarshalJSON ¶
func (s *SubscribeToAccountEventsReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SubscribeToAccountEventsReq) SetAddress ¶
func (s *SubscribeToAccountEventsReq) SetAddress(val string)
SetAddress sets the value of Address.
func (*SubscribeToAccountEventsReq) SetProof ¶
func (s *SubscribeToAccountEventsReq) SetProof(val SubscribeToAccountEventsReqProof)
SetProof sets the value of Proof.
func (*SubscribeToAccountEventsReq) SetTwaInitData ¶
func (s *SubscribeToAccountEventsReq) SetTwaInitData(val string)
SetTwaInitData sets the value of TwaInitData.
func (*SubscribeToAccountEventsReq) UnmarshalJSON ¶
func (s *SubscribeToAccountEventsReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type SubscribeToAccountEventsReqProof ¶
type SubscribeToAccountEventsReqProof struct { Timestamp int64 `json:"timestamp"` Domain SubscribeToAccountEventsReqProofDomain `json:"domain"` Signature string `json:"signature"` Payload string `json:"payload"` StateInit OptString `json:"state_init"` }
TON Connect proof of ownership of the address.
func (*SubscribeToAccountEventsReqProof) Decode ¶
func (s *SubscribeToAccountEventsReqProof) Decode(d *jx.Decoder) error
Decode decodes SubscribeToAccountEventsReqProof from json.
func (*SubscribeToAccountEventsReqProof) Encode ¶
func (s *SubscribeToAccountEventsReqProof) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SubscribeToAccountEventsReqProof) GetDomain ¶
func (s *SubscribeToAccountEventsReqProof) GetDomain() SubscribeToAccountEventsReqProofDomain
GetDomain returns the value of Domain.
func (*SubscribeToAccountEventsReqProof) GetPayload ¶
func (s *SubscribeToAccountEventsReqProof) GetPayload() string
GetPayload returns the value of Payload.
func (*SubscribeToAccountEventsReqProof) GetSignature ¶
func (s *SubscribeToAccountEventsReqProof) GetSignature() string
GetSignature returns the value of Signature.
func (*SubscribeToAccountEventsReqProof) GetStateInit ¶
func (s *SubscribeToAccountEventsReqProof) GetStateInit() OptString
GetStateInit returns the value of StateInit.
func (*SubscribeToAccountEventsReqProof) GetTimestamp ¶
func (s *SubscribeToAccountEventsReqProof) GetTimestamp() int64
GetTimestamp returns the value of Timestamp.
func (*SubscribeToAccountEventsReqProof) MarshalJSON ¶
func (s *SubscribeToAccountEventsReqProof) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SubscribeToAccountEventsReqProof) SetDomain ¶
func (s *SubscribeToAccountEventsReqProof) SetDomain(val SubscribeToAccountEventsReqProofDomain)
SetDomain sets the value of Domain.
func (*SubscribeToAccountEventsReqProof) SetPayload ¶
func (s *SubscribeToAccountEventsReqProof) SetPayload(val string)
SetPayload sets the value of Payload.
func (*SubscribeToAccountEventsReqProof) SetSignature ¶
func (s *SubscribeToAccountEventsReqProof) SetSignature(val string)
SetSignature sets the value of Signature.
func (*SubscribeToAccountEventsReqProof) SetStateInit ¶
func (s *SubscribeToAccountEventsReqProof) SetStateInit(val OptString)
SetStateInit sets the value of StateInit.
func (*SubscribeToAccountEventsReqProof) SetTimestamp ¶
func (s *SubscribeToAccountEventsReqProof) SetTimestamp(val int64)
SetTimestamp sets the value of Timestamp.
func (*SubscribeToAccountEventsReqProof) UnmarshalJSON ¶
func (s *SubscribeToAccountEventsReqProof) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type SubscribeToAccountEventsReqProofDomain ¶
type SubscribeToAccountEventsReqProofDomain struct { LengthBytes OptUint32 `json:"length_bytes"` Value string `json:"value"` }
func (*SubscribeToAccountEventsReqProofDomain) Decode ¶
func (s *SubscribeToAccountEventsReqProofDomain) Decode(d *jx.Decoder) error
Decode decodes SubscribeToAccountEventsReqProofDomain from json.
func (*SubscribeToAccountEventsReqProofDomain) Encode ¶
func (s *SubscribeToAccountEventsReqProofDomain) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SubscribeToAccountEventsReqProofDomain) GetLengthBytes ¶
func (s *SubscribeToAccountEventsReqProofDomain) GetLengthBytes() OptUint32
GetLengthBytes returns the value of LengthBytes.
func (*SubscribeToAccountEventsReqProofDomain) GetValue ¶
func (s *SubscribeToAccountEventsReqProofDomain) GetValue() string
GetValue returns the value of Value.
func (*SubscribeToAccountEventsReqProofDomain) MarshalJSON ¶
func (s *SubscribeToAccountEventsReqProofDomain) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SubscribeToAccountEventsReqProofDomain) SetLengthBytes ¶
func (s *SubscribeToAccountEventsReqProofDomain) SetLengthBytes(val OptUint32)
SetLengthBytes sets the value of LengthBytes.
func (*SubscribeToAccountEventsReqProofDomain) SetValue ¶
func (s *SubscribeToAccountEventsReqProofDomain) SetValue(val string)
SetValue sets the value of Value.
func (*SubscribeToAccountEventsReqProofDomain) UnmarshalJSON ¶
func (s *SubscribeToAccountEventsReqProofDomain) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type SubscribeToBridgeEventsOK ¶
type SubscribeToBridgeEventsOK struct{}
SubscribeToBridgeEventsOK is response for SubscribeToBridgeEvents operation.
type SubscribeToBridgeEventsReq ¶
type SubscribeToBridgeEventsReq struct { // Base64 encoded twa init data. TwaInitData string `json:"twa_init_data"` ClientID string `json:"client_id"` Origin string `json:"origin"` }
func (*SubscribeToBridgeEventsReq) Decode ¶
func (s *SubscribeToBridgeEventsReq) Decode(d *jx.Decoder) error
Decode decodes SubscribeToBridgeEventsReq from json.
func (*SubscribeToBridgeEventsReq) Encode ¶
func (s *SubscribeToBridgeEventsReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SubscribeToBridgeEventsReq) GetClientID ¶
func (s *SubscribeToBridgeEventsReq) GetClientID() string
GetClientID returns the value of ClientID.
func (*SubscribeToBridgeEventsReq) GetOrigin ¶
func (s *SubscribeToBridgeEventsReq) GetOrigin() string
GetOrigin returns the value of Origin.
func (*SubscribeToBridgeEventsReq) GetTwaInitData ¶
func (s *SubscribeToBridgeEventsReq) GetTwaInitData() string
GetTwaInitData returns the value of TwaInitData.
func (*SubscribeToBridgeEventsReq) MarshalJSON ¶
func (s *SubscribeToBridgeEventsReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SubscribeToBridgeEventsReq) SetClientID ¶
func (s *SubscribeToBridgeEventsReq) SetClientID(val string)
SetClientID sets the value of ClientID.
func (*SubscribeToBridgeEventsReq) SetOrigin ¶
func (s *SubscribeToBridgeEventsReq) SetOrigin(val string)
SetOrigin sets the value of Origin.
func (*SubscribeToBridgeEventsReq) SetTwaInitData ¶
func (s *SubscribeToBridgeEventsReq) SetTwaInitData(val string)
SetTwaInitData sets the value of TwaInitData.
func (*SubscribeToBridgeEventsReq) UnmarshalJSON ¶
func (s *SubscribeToBridgeEventsReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) AccountEventsSubscriptionStatus ¶
func (UnimplementedHandler) AccountEventsSubscriptionStatus(ctx context.Context, req *AccountEventsSubscriptionStatusReq) (r *AccountEventsSubscriptionStatusOK, _ error)
AccountEventsSubscriptionStatus implements accountEventsSubscriptionStatus operation.
Get a status of an account-events subscription.
POST /account-events/subscription-status
func (UnimplementedHandler) BridgeWebhook ¶
func (UnimplementedHandler) BridgeWebhook(ctx context.Context, req *BridgeWebhookReq, params BridgeWebhookParams) error
BridgeWebhook implements bridgeWebhook operation.
Webhook called by the HTTP Bridge when an event occurs.
POST /bridge/webhook/{client_id}
func (UnimplementedHandler) GetTonConnectPayload ¶
func (UnimplementedHandler) GetTonConnectPayload(ctx context.Context) (r *GetTonConnectPayloadOK, _ error)
GetTonConnectPayload implements getTonConnectPayload operation.
Get a challenge for TON Connect.
GET /tonconnect/payload
func (UnimplementedHandler) NewError ¶
func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
NewError creates *ErrorStatusCode from error returned by handler.
Used for common default response.
func (UnimplementedHandler) SubscribeToAccountEvents ¶
func (UnimplementedHandler) SubscribeToAccountEvents(ctx context.Context, req *SubscribeToAccountEventsReq) error
SubscribeToAccountEvents implements subscribeToAccountEvents operation.
Subscribe to notifications about events in the TON blockchain for a specific address.
POST /account-events/subscribe
func (UnimplementedHandler) SubscribeToBridgeEvents ¶
func (UnimplementedHandler) SubscribeToBridgeEvents(ctx context.Context, req *SubscribeToBridgeEventsReq) error
SubscribeToBridgeEvents implements subscribeToBridgeEvents operation.
Subscribe to notifications from the HTTP Bridge regarding a specific smart contract or wallet.
POST /bridge/subscribe
func (UnimplementedHandler) UnsubscribeFromAccountEvents ¶
func (UnimplementedHandler) UnsubscribeFromAccountEvents(ctx context.Context, req *UnsubscribeFromAccountEventsReq) error
UnsubscribeFromAccountEvents implements unsubscribeFromAccountEvents operation.
Unsubscribe from notifications about events in the TON blockchain for a specific address.
POST /account-events/unsubscribe
func (UnimplementedHandler) UnsubscribeFromBridgeEvents ¶
func (UnimplementedHandler) UnsubscribeFromBridgeEvents(ctx context.Context, req *UnsubscribeFromBridgeEventsReq) error
UnsubscribeFromBridgeEvents implements unsubscribeFromBridgeEvents operation.
Unsubscribe from bridge notifications.
POST /bridge/unsubscribe
type UnsubscribeFromAccountEventsOK ¶
type UnsubscribeFromAccountEventsOK struct{}
UnsubscribeFromAccountEventsOK is response for UnsubscribeFromAccountEvents operation.
type UnsubscribeFromAccountEventsReq ¶
type UnsubscribeFromAccountEventsReq struct { // Base64 encoded twa init data. TwaInitData string `json:"twa_init_data"` }
func (*UnsubscribeFromAccountEventsReq) Decode ¶
func (s *UnsubscribeFromAccountEventsReq) Decode(d *jx.Decoder) error
Decode decodes UnsubscribeFromAccountEventsReq from json.
func (*UnsubscribeFromAccountEventsReq) Encode ¶
func (s *UnsubscribeFromAccountEventsReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UnsubscribeFromAccountEventsReq) GetTwaInitData ¶
func (s *UnsubscribeFromAccountEventsReq) GetTwaInitData() string
GetTwaInitData returns the value of TwaInitData.
func (*UnsubscribeFromAccountEventsReq) MarshalJSON ¶
func (s *UnsubscribeFromAccountEventsReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UnsubscribeFromAccountEventsReq) SetTwaInitData ¶
func (s *UnsubscribeFromAccountEventsReq) SetTwaInitData(val string)
SetTwaInitData sets the value of TwaInitData.
func (*UnsubscribeFromAccountEventsReq) UnmarshalJSON ¶
func (s *UnsubscribeFromAccountEventsReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UnsubscribeFromBridgeEventsOK ¶
type UnsubscribeFromBridgeEventsOK struct{}
UnsubscribeFromBridgeEventsOK is response for UnsubscribeFromBridgeEvents operation.
type UnsubscribeFromBridgeEventsReq ¶
type UnsubscribeFromBridgeEventsReq struct { // Base64 encoded twa init data. TwaInitData string `json:"twa_init_data"` ClientID OptString `json:"client_id"` }
func (*UnsubscribeFromBridgeEventsReq) Decode ¶
func (s *UnsubscribeFromBridgeEventsReq) Decode(d *jx.Decoder) error
Decode decodes UnsubscribeFromBridgeEventsReq from json.
func (*UnsubscribeFromBridgeEventsReq) Encode ¶
func (s *UnsubscribeFromBridgeEventsReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UnsubscribeFromBridgeEventsReq) GetClientID ¶
func (s *UnsubscribeFromBridgeEventsReq) GetClientID() OptString
GetClientID returns the value of ClientID.
func (*UnsubscribeFromBridgeEventsReq) GetTwaInitData ¶
func (s *UnsubscribeFromBridgeEventsReq) GetTwaInitData() string
GetTwaInitData returns the value of TwaInitData.
func (*UnsubscribeFromBridgeEventsReq) MarshalJSON ¶
func (s *UnsubscribeFromBridgeEventsReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UnsubscribeFromBridgeEventsReq) SetClientID ¶
func (s *UnsubscribeFromBridgeEventsReq) SetClientID(val OptString)
SetClientID sets the value of ClientID.
func (*UnsubscribeFromBridgeEventsReq) SetTwaInitData ¶
func (s *UnsubscribeFromBridgeEventsReq) SetTwaInitData(val string)
SetTwaInitData sets the value of TwaInitData.
func (*UnsubscribeFromBridgeEventsReq) UnmarshalJSON ¶
func (s *UnsubscribeFromBridgeEventsReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
Source Files ¶
- error.go
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go