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 {
|
2024-06-04 20:06:44 +02:00
|
|
|
HandleAccount(a *store.Account, rxBytes, txBytes int64, limit store.BandwidthClass, trx *sqlx.Tx) error
|
2023-03-23 22:04:10 +01:00
|
|
|
}
|
|
|
|
|
2023-03-23 22:07:48 +01:00
|
|
|
type EnvironmentAction interface {
|
2024-06-04 20:06:44 +02:00
|
|
|
HandleEnvironment(e *store.Environment, rxBytes, txBytes int64, limit store.BandwidthClass, trx *sqlx.Tx) error
|
2023-03-23 22:04:10 +01:00
|
|
|
}
|
|
|
|
|
2023-03-23 22:07:48 +01:00
|
|
|
type ShareAction interface {
|
2024-06-04 20:06:44 +02:00
|
|
|
HandleShare(s *store.Share, rxBytes, txBytes int64, limit store.BandwidthClass, trx *sqlx.Tx) error
|
2023-03-23 22:04:10 +01:00
|
|
|
}
|