2023-03-23 22:04:10 +01:00
|
|
|
package limits
|
|
|
|
|
2023-03-27 19:51:48 +02:00
|
|
|
import (
|
|
|
|
"github.com/jmoiron/sqlx"
|
|
|
|
"github.com/openziti/zrok/controller/store"
|
|
|
|
)
|
2023-03-23 22:04:10 +01:00
|
|
|
|
2023-03-23 22:07:48 +01:00
|
|
|
type AccountAction interface {
|
2023-03-27 19:51:48 +02:00
|
|
|
HandleAccount(a *store.Account, rxBytes, txBytes int64, limit *BandwidthPerPeriod, trx *sqlx.Tx) error
|
2023-03-23 22:04:10 +01:00
|
|
|
}
|
|
|
|
|
2023-03-23 22:07:48 +01:00
|
|
|
type EnvironmentAction interface {
|
2023-03-27 19:51:48 +02:00
|
|
|
HandleEnvironment(e *store.Environment, rxBytes, txBytes int64, limit *BandwidthPerPeriod, trx *sqlx.Tx) error
|
2023-03-23 22:04:10 +01:00
|
|
|
}
|
|
|
|
|
2023-03-23 22:07:48 +01:00
|
|
|
type ShareAction interface {
|
2023-03-27 19:51:48 +02:00
|
|
|
HandleShare(s *store.Share, rxBytes, txBytes int64, limit *BandwidthPerPeriod, trx *sqlx.Tx) error
|
2023-03-23 22:04:10 +01:00
|
|
|
}
|