darkgrpc

package
v1.72.3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const DarkstatGRpcSock = "/tmp/darkstat/grpc.sock"
View Source
const DefaultServerPort = 50051

Variables

This section is empty.

Functions

func FilterMarketGoodCategory

func FilterMarketGoodCategory[T Stringable](filter_category []string, items map[T]*configs_export.MarketGood) map[string]*configs_export.MarketGood

func FilterNicknames

func FilterNicknames[T Nicknamable](filter_nicknames []string, items []T) []T

func GetHashesData

func GetHashesData(app_data *appdata.AppData) map[string]Hash

func NewAmmoLimit

func NewAmmoLimit(AmmoLimit configs_export.AmmoLimit) *pb.AmmoLimit

func NewBase

func NewBase(base *configs_export.Base, include_market_goods bool, filter_market_good_category []string) *pb.Base

func NewBaseInfo

func NewBaseInfo(BaseInfo configs_export.BaseInfo) *pb.BaseInfo

func NewBases

func NewBases(Bases map[cfg.BaseUniNick]*configs_export.MarketGood) map[string]*pb.MarketGood

func NewGraphQuery

func NewGraphQuery(Query *appdata.GraphPathReq) *pb.GraphPathQuery

func NewGraphTimeAnswer

func NewGraphTimeAnswer(Time *appdata.GraphPathTime) *pb.GraphPathTime

func NewGun

func NewGun(item configs_export.Gun, in *pb.GetGunsInput) *pb.Gun

func NewInfocard

func NewInfocard(info configs_export.Infocard) *pb.Infocard

func NewInt64

func NewInt64(value *int) *int64

func NewInt64FromDefenseMode

func NewInt64FromDefenseMode(DefenseMode *configs_export.DefenseMode) *int64

func NewMarketGood

func NewMarketGood(good *configs_export.MarketGood) *pb.MarketGood

func NewPoBCore

func NewPoBCore(base *configs_export.PoBCore) *pb.PoBCore

func NewPos

func NewPos(pos *cfg.Vector) *pb.Pos

func NewShopItem

func NewShopItem(item *configs_export.ShopItem) *pb.ShopItem

func NewTechCompat

func NewTechCompat(tech_compat *configs_export.DiscoveryTechCompat) *pb.DiscoveryTechCompat

Types

type Client

type Client struct {
	Conn *grpc.ClientConn
	pb.DarkstatClient
}

func NewClient

func NewClient(address string) *Client

type Hash

type Hash struct {
	Int32  int32  `json:"int32"  validate:"required"`
	Uint32 uint32 `json:"uint32"  validate:"required"`
	Hex    string `json:"hex"  validate:"required"`
}

type Hashes

type Hashes struct {
	HashesByNick map[string]Hash `json:"hashes_by_nick"  validate:"required"`
}

type Marketable

type Marketable interface {
	Nicknamable
	GetBases() map[cfg.BaseUniNick]*configs_export.MarketGood
}

type Nicknamable

type Nicknamable interface {
	GetNickname() string
}

type Server

type Server struct {
	pb.UnimplementedDarkstatServer
	// contains filtered or unexported fields
}

server is used to implement helloworld.GreeterServer.

func NewServer

func NewServer(app_data *appdata.AppData, port int, opts ...ServerOpt) *Server

func (*Server) GetAmmos

func (s *Server) GetAmmos(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetAmmoReply, error)

func (*Server) GetBasesMiningOperations

func (s *Server) GetBasesMiningOperations(_ context.Context, in *pb.GetBasesInput) (*pb.GetBasesReply, error)

func (*Server) GetBasesNpc

func (s *Server) GetBasesNpc(_ context.Context, in *pb.GetBasesInput) (*pb.GetBasesReply, error)

func (*Server) GetBasesPoBs

func (s *Server) GetBasesPoBs(_ context.Context, in *pb.GetBasesInput) (*pb.GetBasesReply, error)

func (*Server) GetCommodities

func (s *Server) GetCommodities(_ context.Context, in *pb.GetCommoditiesInput) (*pb.GetCommoditiesReply, error)

func (*Server) GetCounterMeasures

func (s *Server) GetCounterMeasures(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetCounterMeasuresReply, error)

func (*Server) GetEngines

func (s *Server) GetEngines(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetEnginesReply, error)

func (*Server) GetFactions

func (s *Server) GetFactions(_ context.Context, in *pb.GetFactionsInput) (*pb.GetFactionsReply, error)

func (*Server) GetGraphPaths

func (s *Server) GetGraphPaths(_ context.Context, in *pb.GetGraphPathsInput) (*pb.GetGraphPathsReply, error)

func (*Server) GetGuns

func (s *Server) GetGuns(_ context.Context, in *pb.GetGunsInput) (*pb.GetGunsReply, error)

func (*Server) GetHashes

func (s *Server) GetHashes(_ context.Context, in *pb.Empty) (*pb.GetHashesReply, error)

func (*Server) GetHealth

func (s *Server) GetHealth(_ context.Context, in *pb.Empty) (*pb.HealthReply, error)

func (*Server) GetInfocards

func (s *Server) GetInfocards(_ context.Context, in *pb.GetInfocardsInput) (*pb.GetInfocardsReply, error)

func (*Server) GetMines

func (s *Server) GetMines(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetMinesReply, error)

func (*Server) GetMissiles

func (s *Server) GetMissiles(_ context.Context, in *pb.GetGunsInput) (*pb.GetGunsReply, error)

func (*Server) GetPoBGoods

func (s *Server) GetPoBGoods(_ context.Context, in *pb.Empty) (*pb.GetPoBGoodsReply, error)

func (*Server) GetPoBs

func (s *Server) GetPoBs(_ context.Context, in *pb.Empty) (*pb.GetPoBsReply, error)

func (*Server) GetScanners

func (s *Server) GetScanners(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetScannersReply, error)

func (*Server) GetShields

func (s *Server) GetShields(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetShieldsReply, error)

func (*Server) GetShips

func (s *Server) GetShips(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetShipsReply, error)

func (*Server) GetThrusters

func (s *Server) GetThrusters(_ context.Context, in *pb.GetEquipmentInput) (*pb.GetThrustersReply, error)

func (*Server) GetTractors

func (s *Server) GetTractors(_ context.Context, in *pb.GetTractorsInput) (*pb.GetTractorsReply, error)

func (*Server) Serve

func (r *Server) Serve()

type ServerOpt

type ServerOpt func(s *Server)

func WithSockAddr

func WithSockAddr(sock string) ServerOpt

type Stringable

type Stringable interface {
	comparable
	ToStr() string
}

type TechCompatable

type TechCompatable interface {
	Nicknamable
	GetDiscoveryTechCompat() *configs_export.DiscoveryTechCompat
}

Directories

Path Synopsis
Package statproto is a reverse proxy.
Package statproto is a reverse proxy.

Jump to

Keyboard shortcuts

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