-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstorage.go
24 lines (21 loc) · 1.27 KB
/
storage.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package be
import (
"context"
"github.com/bamboo-firewall/be/domain/model"
"github.com/bamboo-firewall/be/pkg/entity"
"github.com/bamboo-firewall/be/pkg/httpbase/ierror"
)
type Storage interface {
UpsertHostEndpoint(ctx context.Context, hep *entity.HostEndpoint) *ierror.CoreError
GetHostEndpoint(ctx context.Context, input *model.GetHostEndpointInput) (*entity.HostEndpoint, *ierror.CoreError)
DeleteHostEndpoint(ctx context.Context, tenantID uint64, ip uint32) *ierror.CoreError
ListHostEndpoints(ctx context.Context, input *model.ListHostEndpointsInput) ([]*entity.HostEndpoint, *ierror.CoreError)
UpsertGroupPolicy(ctx context.Context, gnp *entity.GlobalNetworkPolicy) *ierror.CoreError
GetGNPByName(ctx context.Context, name string) (*entity.GlobalNetworkPolicy, *ierror.CoreError)
DeleteGNPByName(ctx context.Context, name string) *ierror.CoreError
ListGNPs(ctx context.Context, input *model.ListGNPsInput) ([]*entity.GlobalNetworkPolicy, *ierror.CoreError)
UpsertGNS(ctx context.Context, gns *entity.GlobalNetworkSet) *ierror.CoreError
GetGNSByName(ctx context.Context, name string) (*entity.GlobalNetworkSet, *ierror.CoreError)
DeleteGNSByName(ctx context.Context, name string) *ierror.CoreError
ListGNSs(ctx context.Context) ([]*entity.GlobalNetworkSet, *ierror.CoreError)
}