Documentation ¶
Index ¶
- Constants
- type API
- type Server
- func (s Server) GetFactorial(ctx context.Context, input *pb.GetFactorialMsg) (*pb.GetFactorialReply, error)
- func (s Server) GetSquare(ctx context.Context, input *pb.GetSquareMsg) (*pb.GetSquareReply, error)
- func (s Server) GetSquareRoot(ctx context.Context, input *pb.GetSquareRootMsg) (*pb.GetSquareRootReply, error)
- func (s *Server) SetupServices()
- type ServerConfig
Constants ¶
View Source
const ( ErrInternalServer = "an error occurred within math api server" LoggingPackageName = "internal.apiserver.grpc.apis.math.v1" )
View Source
const (
NegativeNumberProvidedErr = "negative number provided"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
var (
APIServer Server
)
func NewServer ¶
func NewServer(config *ServerConfig) Server
func (Server) GetFactorial ¶
func (s Server) GetFactorial(ctx context.Context, input *pb.GetFactorialMsg) (*pb.GetFactorialReply, error)
func (Server) GetSquare ¶
func (s Server) GetSquare(ctx context.Context, input *pb.GetSquareMsg) (*pb.GetSquareReply, error)
func (Server) GetSquareRoot ¶
func (s Server) GetSquareRoot(ctx context.Context, input *pb.GetSquareRootMsg) (*pb.GetSquareRootReply, error)
func (*Server) SetupServices ¶
func (s *Server) SetupServices()
Click to show internal directories.
Click to hide internal directories.