Documentation ¶
Overview ¶
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- type BillingServiceServer
- func (s *BillingServiceServer) CreatePlan(ctx context.Context, plan *pb.Plan) (*pb.Plan, error)
- func (s *BillingServiceServer) CreateTransaction(ctx context.Context, t *pb.Transaction) (*pb.Transaction, error)
- func (s *BillingServiceServer) DeletePlan(ctx context.Context, plan *pb.Plan) (*pb.Plan, error)
- func (s *BillingServiceServer) GenTransactions(ctx context.Context, log *zap.Logger, tick time.Time, ...)
- func (s *BillingServiceServer) GenTransactionsRoutine(ctx context.Context)
- func (s *BillingServiceServer) GenTransactionsRoutineState() []*hpb.RoutineStatus
- func (s *BillingServiceServer) GetPlan(ctx context.Context, plan *pb.Plan) (*pb.Plan, error)
- func (s *BillingServiceServer) GetRecords(ctx context.Context, req *pb.Transaction) (*pb.Records, error)
- func (s *BillingServiceServer) GetTransactions(ctx context.Context, req *pb.GetTransactionsRequest) (*pb.Transactions, error)
- func (s *BillingServiceServer) ListPlans(ctx context.Context, req *pb.ListRequest) (*pb.ListResponse, error)
- func (s *BillingServiceServer) Reprocess(ctx context.Context, req *pb.ReprocessTransactionsRequest) (*pb.Transactions, error)
- func (s *BillingServiceServer) SuspendAccountsRoutine(ctx context.Context)
- func (s *BillingServiceServer) SuspendAccountsRoutineState() *hpb.RoutineStatus
- func (s *BillingServiceServer) UpdatePlan(ctx context.Context, plan *pb.Plan) (*pb.Plan, error)
- type CurrencyConf
- type CurrencyServiceServer
- func (s *CurrencyServiceServer) Convert(ctx context.Context, req *pb.ConversionRequest) (*pb.ConversionResponse, error)
- func (s *CurrencyServiceServer) CreateExchangeRate(ctx context.Context, req *pb.CreateExchangeRateRequest) (*pb.CreateExchangeRateResponse, error)
- func (s *CurrencyServiceServer) DeleteExchangeRate(ctx context.Context, req *pb.DeleteExchangeRateRequest) (*pb.DeleteExchangeRateResponse, error)
- func (s *CurrencyServiceServer) GetCurrencies(ctx context.Context, req *pb.GetCurrenciesRequest) (*pb.GetCurrenciesResponse, error)
- func (s *CurrencyServiceServer) GetExchangeRate(ctx context.Context, req *pb.GetExchangeRateRequest) (*pb.GetExchangeRateResponse, error)
- func (s *CurrencyServiceServer) GetExchangeRates(ctx context.Context, req *pb.GetExchangeRatesRequest) (*pb.GetExchangeRatesResponse, error)
- func (s *CurrencyServiceServer) UpdateExchangeRate(ctx context.Context, req *pb.UpdateExchangeRateRequest) (*pb.UpdateExchangeRateResponse, error)
- type RecordsServiceServer
- type RoundingConf
- type Routine
- type RoutineConf
- type SuspendConf
- type SuspendSchedule
Constants ¶
This section is empty.
Variables ¶
var (
RabbitMQConn string
)
Functions ¶
This section is empty.
Types ¶
type BillingServiceServer ¶
type BillingServiceServer struct { pb.UnimplementedBillingServiceServer // contains filtered or unexported fields }
func NewBillingServiceServer ¶
func NewBillingServiceServer(logger *zap.Logger, db driver.Database) *BillingServiceServer
func (*BillingServiceServer) CreatePlan ¶
func (*BillingServiceServer) CreateTransaction ¶
func (s *BillingServiceServer) CreateTransaction(ctx context.Context, t *pb.Transaction) (*pb.Transaction, error)
func (*BillingServiceServer) DeletePlan ¶
func (*BillingServiceServer) GenTransactions ¶ added in v0.0.18
func (s *BillingServiceServer) GenTransactions(ctx context.Context, log *zap.Logger, tick time.Time, currencyConf CurrencyConf, roundingConf RoundingConf)
func (*BillingServiceServer) GenTransactionsRoutine ¶
func (s *BillingServiceServer) GenTransactionsRoutine(ctx context.Context)
func (*BillingServiceServer) GenTransactionsRoutineState ¶
func (s *BillingServiceServer) GenTransactionsRoutineState() []*hpb.RoutineStatus
func (*BillingServiceServer) GetRecords ¶
func (s *BillingServiceServer) GetRecords(ctx context.Context, req *pb.Transaction) (*pb.Records, error)
func (*BillingServiceServer) GetTransactions ¶
func (s *BillingServiceServer) GetTransactions(ctx context.Context, req *pb.GetTransactionsRequest) (*pb.Transactions, error)
func (*BillingServiceServer) ListPlans ¶
func (s *BillingServiceServer) ListPlans(ctx context.Context, req *pb.ListRequest) (*pb.ListResponse, error)
func (*BillingServiceServer) Reprocess ¶
func (s *BillingServiceServer) Reprocess(ctx context.Context, req *pb.ReprocessTransactionsRequest) (*pb.Transactions, error)
func (*BillingServiceServer) SuspendAccountsRoutine ¶ added in v0.0.18
func (s *BillingServiceServer) SuspendAccountsRoutine(ctx context.Context)
func (*BillingServiceServer) SuspendAccountsRoutineState ¶ added in v0.0.18
func (s *BillingServiceServer) SuspendAccountsRoutineState() *hpb.RoutineStatus
func (*BillingServiceServer) UpdatePlan ¶
type CurrencyConf ¶ added in v0.0.18
type CurrencyConf struct {
Currency int32 `json:"currency"` // Default currency for platform
}
func MakeCurrencyConf ¶ added in v0.0.18
func MakeCurrencyConf(ctx context.Context, log *zap.Logger) (conf CurrencyConf)
type CurrencyServiceServer ¶
type CurrencyServiceServer struct { pb.UnimplementedCurrencyServiceServer // contains filtered or unexported fields }
func NewCurrencyServiceServer ¶
func NewCurrencyServiceServer(log *zap.Logger, db driver.Database) *CurrencyServiceServer
func (*CurrencyServiceServer) Convert ¶
func (s *CurrencyServiceServer) Convert(ctx context.Context, req *pb.ConversionRequest) (*pb.ConversionResponse, error)
func (*CurrencyServiceServer) CreateExchangeRate ¶
func (s *CurrencyServiceServer) CreateExchangeRate(ctx context.Context, req *pb.CreateExchangeRateRequest) (*pb.CreateExchangeRateResponse, error)
func (*CurrencyServiceServer) DeleteExchangeRate ¶
func (s *CurrencyServiceServer) DeleteExchangeRate(ctx context.Context, req *pb.DeleteExchangeRateRequest) (*pb.DeleteExchangeRateResponse, error)
func (*CurrencyServiceServer) GetCurrencies ¶
func (s *CurrencyServiceServer) GetCurrencies(ctx context.Context, req *pb.GetCurrenciesRequest) (*pb.GetCurrenciesResponse, error)
func (*CurrencyServiceServer) GetExchangeRate ¶
func (s *CurrencyServiceServer) GetExchangeRate(ctx context.Context, req *pb.GetExchangeRateRequest) (*pb.GetExchangeRateResponse, error)
func (*CurrencyServiceServer) GetExchangeRates ¶ added in v0.0.18
func (s *CurrencyServiceServer) GetExchangeRates(ctx context.Context, req *pb.GetExchangeRatesRequest) (*pb.GetExchangeRatesResponse, error)
func (*CurrencyServiceServer) UpdateExchangeRate ¶
func (s *CurrencyServiceServer) UpdateExchangeRate(ctx context.Context, req *pb.UpdateExchangeRateRequest) (*pb.UpdateExchangeRateResponse, error)
type RecordsServiceServer ¶
type RecordsServiceServer struct { pb.UnimplementedRecordsServiceServer ConsumerStatus *healthpb.RoutineStatus // contains filtered or unexported fields }
func NewRecordsServiceServer ¶
func NewRecordsServiceServer(logger *zap.Logger, db driver.Database) *RecordsServiceServer
func (*RecordsServiceServer) Consume ¶
func (s *RecordsServiceServer) Consume(ctx context.Context)
type RoundingConf ¶ added in v0.0.18
type RoundingConf struct {
Rounding string `json:"rounding"` // Rounding used in payments
}
func MakeRoundingConf ¶ added in v0.0.18
func MakeRoundingConf(ctx context.Context, log *zap.Logger) (conf RoundingConf)
type RoutineConf ¶
type RoutineConf struct {
Frequency int `json:"freq"` // Frequency in Seconds
}
func MakeRoutineConf ¶
func MakeRoutineConf(ctx context.Context, log *zap.Logger) (conf RoutineConf)
type SuspendConf ¶
type SuspendConf struct { AutoResume bool `json:"auto_resume"` IsEnabled bool `json:"is_enabled"` Limit float64 `json:"limit"` Schedule []SuspendSchedule `json:"schedule"` IsExtraEnabled bool `json:"is_extra_enabled"` ExtraLimit float64 `json:"extra_limit"` }
func MakeSuspendConf ¶
func MakeSuspendConf(ctx context.Context, log *zap.Logger) (conf SuspendConf)