Documentation
¶
Overview ¶
Package execution provides MiniApp execution tracking via Supabase.
Package execution provides MiniApp execution tracking via Supabase.
Index ¶
- type CreateRequest
- type Execution
- type Service
- func (s *Service) Create(ctx context.Context, req CreateRequest) (*Execution, error)
- func (s *Service) MarkFailed(ctx context.Context, requestID, errMsg, errCode string) error
- func (s *Service) MarkProcessing(ctx context.Context, requestID string) error
- func (s *Service) MarkSuccess(ctx context.Context, requestID string, result map[string]interface{}) error
- func (s *Service) UpdateTxStatus(ctx context.Context, requestID, txHash, txStatus string) error
- type Status
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct {
RequestID string `json:"request_id"`
AppID string `json:"app_id"`
UserAddress string `json:"user_address,omitempty"`
SessionID string `json:"session_id,omitempty"`
Method string `json:"method"`
Params map[string]interface{} `json:"params,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
CreateRequest is the request to create a new execution.
type Execution ¶
type Execution struct {
ID int64 `json:"id,omitempty"`
RequestID string `json:"request_id"`
AppID string `json:"app_id"`
UserAddress string `json:"user_address,omitempty"`
SessionID string `json:"session_id,omitempty"`
Status Status `json:"status"`
Method string `json:"method"`
Params map[string]interface{} `json:"params,omitempty"`
Result map[string]interface{} `json:"result,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
ErrorCode string `json:"error_code,omitempty"`
TxHash string `json:"tx_hash,omitempty"`
TxStatus string `json:"tx_status,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
Execution represents a MiniApp execution record.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles execution tracking operations.
func NewService ¶
NewService creates a new execution service.
func (*Service) MarkFailed ¶
MarkFailed marks an execution as failed with error info.
func (*Service) MarkProcessing ¶
MarkProcessing marks an execution as processing.
type UpdateRequest ¶
type UpdateRequest struct {
Status *Status `json:"status,omitempty"`
Result map[string]interface{} `json:"result,omitempty"`
ErrorMessage *string `json:"error_message,omitempty"`
ErrorCode *string `json:"error_code,omitempty"`
TxHash *string `json:"tx_hash,omitempty"`
TxStatus *string `json:"tx_status,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
}
UpdateRequest is the request to update an execution.
Click to show internal directories.
Click to hide internal directories.