Documentation ¶
Index ¶
- type Config
- type Service
- func (s *Service) CreateOrUpdatePaylink(ctx context.Context, req *paylink.CreatePaylinkRequest, res *paylink.Paylink) error
- func (s *Service) DeletePaylink(ctx context.Context, req *paylink.PaylinkRequest, res *paylink.EmptyResponse) error
- func (s *Service) GetPaylink(ctx context.Context, req *paylink.PaylinkRequest, res *paylink.Paylink) error
- func (s *Service) GetPaylinkStat(ctx context.Context, req *paylink.PaylinkRequest, ...) error
- func (s *Service) GetPaylinkURL(ctx context.Context, req *paylink.GetPaylinkURLRequest, ...) error
- func (s *Service) GetPaylinks(ctx context.Context, req *paylink.GetPaylinksRequest, ...) error
- func (s *Service) IncrPaylinkVisits(ctx context.Context, req *paylink.PaylinkRequest, res *paylink.EmptyResponse) error
- func (s *Service) Status() (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PublicURLHost string `envconfig:"PUBLIC_URL_HOST" required:"true"` PublicURLPath string `envconfig:"PUBLIC_URL_PATH" required:"false" default:"/paylink/"` RedisHost string `envconfig:"REDIS_HOST" required:"false" default:"127.0.0.1:6379"` RedisPassword string `envconfig:"REDIS_PASSWORD" required:"false" default:""` ValidLifeDays []uint32 `envconfig:"VALID_LIFEDAYS" required:"false" default:"1,7,30"` MinProducts int `envconfig:"MIN_PRODUCTS" required:"false" default:"1"` MaxProducts int `envconfig:"MAX_PRODUCTS" required:"false" default:"6"` RedisDb int `envconfig:"REDIS_DB" required:"false" default:"0"` MetricsPort int `envconfig:"METRICS_PORT" required:"false" default:"80"` }
Config define application config object
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is application entry point.
func NewService ¶
NewService create new Service.
func (*Service) CreateOrUpdatePaylink ¶
func (s *Service) CreateOrUpdatePaylink(ctx context.Context, req *paylink.CreatePaylinkRequest, res *paylink.Paylink) error
CreateOrUpdatePaylink create or modify payment link
func (*Service) DeletePaylink ¶
func (s *Service) DeletePaylink(ctx context.Context, req *paylink.PaylinkRequest, res *paylink.EmptyResponse) error
DeletePaylink deletes payment link
func (*Service) GetPaylink ¶
func (s *Service) GetPaylink(ctx context.Context, req *paylink.PaylinkRequest, res *paylink.Paylink) error
GetPaylink returns one payment link
func (*Service) GetPaylinkStat ¶
func (s *Service) GetPaylinkStat(ctx context.Context, req *paylink.PaylinkRequest, res *paylink.GetPaylinkStatResponse) error
GetPaylinkStat return payment link visits statistics
func (*Service) GetPaylinkURL ¶
func (s *Service) GetPaylinkURL(ctx context.Context, req *paylink.GetPaylinkURLRequest, res *paylink.GetPaylinkUrlResponse) error
GetPaylinkURL returns public url for Paylink
func (*Service) GetPaylinks ¶
func (s *Service) GetPaylinks(ctx context.Context, req *paylink.GetPaylinksRequest, res *paylink.GetPaylinksResponse) error
GetPaylinks returns list of all payment links
Click to show internal directories.
Click to hide internal directories.