Documentation ¶
Index ¶
- Variables
- func StartService() error
- type ClientConfig
- type Config
- type DatabaseConfig
- type EtcdConfig
- type HttpServerConfig
- type LogConfig
- type ServerConfig
- type Service
- func (s *Service) AddArticle(ctx context.Context, req *articlepb.AddArticleRequest) (*articlepb.AddArticleResponse, error)
- func (s *Service) DelArticle(ctx context.Context, req *articlepb.DelArticleRequest) (*articlepb.DelArticleResponse, error)
- func (s *Service) GetArticle(ctx context.Context, req *articlepb.GetArticleRequest) (*articlepb.GetArticleResponse, error)
- func (s *Service) GetArticleList(ctx context.Context, req *articlepb.GetArticleListRequest) (*articlepb.GetArticleListResponse, error)
- func (s *Service) ModifyArticleInfo(ctx context.Context, req *articlepb.ModifyArticleInfoRequest) (*articlepb.ModifyArticleInfoResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
App = &Service{}
)
Functions ¶
func StartService ¶
func StartService() error
Types ¶
type ClientConfig ¶
type ClientConfig struct {
UserServiceName string `yaml:"userServiceName" json:"userServiceName"`
}
type Config ¶
type Config struct { Log *LogConfig `yaml:"log" json:"log"` Etcd *EtcdConfig `yaml:"etcd" json:"etcd"` Server *ServerConfig `yaml:"server" json:"server"` HttpServer *HttpServerConfig `yaml:"httpServer" json:"httpServer"` Database *DatabaseConfig `yaml:"database" json:"database"` Client *ClientConfig `yaml:"client" json:"client"` }
type DatabaseConfig ¶
type EtcdConfig ¶
type EtcdConfig struct {
Endpoints []string `yaml:"endpoints" json:"endpoints"`
}
type HttpServerConfig ¶
type HttpServerConfig struct {
Port string `yaml:"port" json:"port"`
}
type ServerConfig ¶
type Service ¶
type Service struct { Config *Config // contains filtered or unexported fields }
func (*Service) AddArticle ¶
func (s *Service) AddArticle(ctx context.Context, req *articlepb.AddArticleRequest) (*articlepb.AddArticleResponse, error)
func (*Service) DelArticle ¶
func (s *Service) DelArticle(ctx context.Context, req *articlepb.DelArticleRequest) (*articlepb.DelArticleResponse, error)
func (*Service) GetArticle ¶
func (s *Service) GetArticle(ctx context.Context, req *articlepb.GetArticleRequest) (*articlepb.GetArticleResponse, error)
func (*Service) GetArticleList ¶
func (s *Service) GetArticleList(ctx context.Context, req *articlepb.GetArticleListRequest) (*articlepb.GetArticleListResponse, error)
func (*Service) ModifyArticleInfo ¶
func (s *Service) ModifyArticleInfo(ctx context.Context, req *articlepb.ModifyArticleInfoRequest) (*articlepb.ModifyArticleInfoResponse, error)
Click to show internal directories.
Click to hide internal directories.