oas

package
v0.0.0-...-ffaf892 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type AccountEventsSubscriptionStatusOK

type AccountEventsSubscriptionStatusOK struct {
	Subscribed bool `json:"subscribed"`
}

func (*AccountEventsSubscriptionStatusOK) Decode

Decode decodes AccountEventsSubscriptionStatusOK from json.

func (*AccountEventsSubscriptionStatusOK) Encode

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

Decode decodes AccountEventsSubscriptionStatusReq from json.

func (*AccountEventsSubscriptionStatusReq) Encode

Encode implements json.Marshaler.

func (*AccountEventsSubscriptionStatusReq) GetAddress

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

type BridgeWebhookReq struct {
	Topic string `json:"topic"`
	Hash  string `json:"hash"`
}

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) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (*Error) Encode

func (s *Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Error) GetError

func (s *Error) GetError() string

GetError returns the value of Error.

func (*Error) MarshalJSON

func (s *Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetError

func (s *Error) SetError(val string)

SetError sets the value of Error.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorStatusCode

type ErrorStatusCode struct {
	StatusCode int
	Response   Error
}

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 Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptUint32

type OptUint32 struct {
	Value uint32
	Set   bool
}

OptUint32 is optional uint32.

func NewOptUint32

func NewOptUint32(v uint32) OptUint32

NewOptUint32 returns new OptUint32 with value set to v.

func (*OptUint32) Decode

func (o *OptUint32) Decode(d *jx.Decoder) error

Decode decodes uint32 from json.

func (OptUint32) Encode

func (o OptUint32) Encode(e *jx.Encoder)

Encode encodes uint32 as json.

func (OptUint32) Get

func (o OptUint32) Get() (v uint32, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptUint32) IsSet

func (o OptUint32) IsSet() bool

IsSet returns true if OptUint32 was set.

func (OptUint32) MarshalJSON

func (s OptUint32) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptUint32) Or

func (o OptUint32) Or(d uint32) uint32

Or returns value if set, or given parameter if does not.

func (*OptUint32) Reset

func (o *OptUint32) Reset()

Reset unsets value.

func (*OptUint32) SetTo

func (o *OptUint32) SetTo(v uint32)

SetTo sets value to v.

func (*OptUint32) UnmarshalJSON

func (s *OptUint32) UnmarshalJSON(data []byte) error

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) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

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.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

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

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

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

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

Decode decodes SubscribeToAccountEventsReqProof from json.

func (*SubscribeToAccountEventsReqProof) Encode

Encode implements json.Marshaler.

func (*SubscribeToAccountEventsReqProof) GetDomain

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

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

Decode decodes SubscribeToAccountEventsReqProofDomain from json.

func (*SubscribeToAccountEventsReqProofDomain) Encode

Encode implements json.Marshaler.

func (*SubscribeToAccountEventsReqProofDomain) GetLengthBytes

GetLengthBytes returns the value of LengthBytes.

func (*SubscribeToAccountEventsReqProofDomain) GetValue

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

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

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

AccountEventsSubscriptionStatus implements accountEventsSubscriptionStatus operation.

Get a status of an account-events subscription.

POST /account-events/subscription-status

func (UnimplementedHandler) BridgeWebhook

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

Decode decodes UnsubscribeFromAccountEventsReq from json.

func (*UnsubscribeFromAccountEventsReq) Encode

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

Decode decodes UnsubscribeFromBridgeEventsReq from json.

func (*UnsubscribeFromBridgeEventsReq) Encode

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.

Jump to

Keyboard shortcuts

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