client.go 488 B

1234567891011121314151617181920212223242526272829
  1. package bvc
  2. import (
  3. "go-common/library/net/http/blademaster"
  4. )
  5. type Client struct {
  6. conf *blademaster.ClientConfig
  7. bvcHost string
  8. mock string
  9. }
  10. func (c *Client) getConf() *blademaster.ClientConfig {
  11. return c.conf
  12. }
  13. func (c *Client) getBvcHost(def string) string {
  14. if c.bvcHost == "" {
  15. return def
  16. }
  17. return c.bvcHost
  18. }
  19. func New(c *blademaster.ClientConfig, bvcHost string, mock string) *Client {
  20. return &Client{
  21. conf: c,
  22. bvcHost: bvcHost,
  23. mock: mock,
  24. }
  25. }