server

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTokenRequest

type AuthTokenRequest struct {
	Broker      string             `json:"broker"`
	Credentials broker.Credentials `json:"credentials"`
	Sandbox     bool               `json:"sandbox"`
}

AuthTokenRequest represents an auth token request

type BrokerWithExtras

type BrokerWithExtras interface {
	broker.Broker
	// contains filtered or unexported methods
}

BrokerWithExtras is a test-oriented interface for server handlers.

type Response

type Response struct {
	OK     bool        `json:"ok"`
	Data   interface{} `json:"data,omitempty"`
	Error  string      `json:"error,omitempty"`
	Broker string      `json:"broker,omitempty"`
}

Response represents a standard API response

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents the HTTP server

func New

func New(cfg *config.Config) *Server

New creates a new server instance. This constructor wires built-in brokers from config (currently KIS, Kiwoom).

func NewWithBrokers

func NewWithBrokers(host string, port int, accounts []config.AccountConfig, brokers map[string]broker.Broker) *Server

NewWithBrokers creates a server with externally provided brokers. This constructor is used by the public pkg/server package for OSS extensibility.

func (*Server) App

func (s *Server) App() *fuego.Server

App returns the underlying Fuego server for embedding/customization.

func (*Server) Run

func (s *Server) Run() error

Run starts the HTTP server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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