server

package
v0.0.0-...-779c065 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server represents the API server

func NewServer

func NewServer(port int, userStore store.Store) *Server

NewServer creates a new server

func (*Server) CreateHandler

func (s *Server) CreateHandler(ctx context.Context) (http.Handler, error)

CreateHandler creates an HTTP handler for the server without starting it This is useful for Lambda functions that need to handle HTTP requests

func (*Server) Run

func (s *Server) Run() error

Run starts the server

type UserConnectHandler

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

UserConnectHandler handles the over-the-wire connect requests, and sends them to the service, which handles in-memory objects.

func NewUserConnectHandler

func NewUserConnectHandler(service *user.Service) *UserConnectHandler

NewUserConnectHandler creates a new service adapter

func (*UserConnectHandler) CreateUser

CreateUser implements the Connect interface

func (*UserConnectHandler) DeleteUser

DeleteUser implements the Connect interface

func (*UserConnectHandler) GetUser

GetUser implements the Connect interface

func (*UserConnectHandler) ListUsers

ListUsers implements the Connect interface

func (*UserConnectHandler) UpdateUser

UpdateUser implements the Connect interface

Jump to

Keyboard shortcuts

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