mirror of
https://github.com/MizuchiLabs/mantrae.git
synced 2025-12-21 06:10:04 -06:00
fixed agents
This commit is contained in:
@@ -3,6 +3,7 @@ package client
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
@@ -13,6 +14,7 @@ import (
|
||||
"github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1/mantraev1connect"
|
||||
"github.com/traefik/paerser/parser"
|
||||
"github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
)
|
||||
|
||||
@@ -64,6 +66,12 @@ func (t *TokenSource) Update(ctx context.Context) error {
|
||||
connect.WithInterceptors(t.Interceptor()),
|
||||
)
|
||||
|
||||
// Track which resources are synced
|
||||
syncedRouters := map[string]struct{}{}
|
||||
syncedServices := map[string]struct{}{}
|
||||
syncedMiddlewares := map[string]struct{}{}
|
||||
|
||||
// Parse labels and upsert
|
||||
for _, container := range containers {
|
||||
dyn := &dynamic.Configuration{
|
||||
HTTP: &dynamic.HTTPConfiguration{},
|
||||
@@ -93,13 +101,8 @@ func (t *TokenSource) Update(ctx context.Context) error {
|
||||
ctx,
|
||||
routerClient,
|
||||
mantraev1.RouterType_ROUTER_TYPE_HTTP,
|
||||
func() map[string]any {
|
||||
m := make(map[string]any, len(dyn.HTTP.Routers))
|
||||
for k, v := range dyn.HTTP.Routers {
|
||||
m[k] = v
|
||||
}
|
||||
return m
|
||||
}(),
|
||||
ToAnyMap(dyn.HTTP.Routers),
|
||||
syncedRouters,
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -107,13 +110,8 @@ func (t *TokenSource) Update(ctx context.Context) error {
|
||||
ctx,
|
||||
routerClient,
|
||||
mantraev1.RouterType_ROUTER_TYPE_TCP,
|
||||
func() map[string]any {
|
||||
m := make(map[string]any, len(dyn.TCP.Routers))
|
||||
for k, v := range dyn.TCP.Routers {
|
||||
m[k] = v
|
||||
}
|
||||
return m
|
||||
}(),
|
||||
ToAnyMap(dyn.TCP.Routers),
|
||||
syncedRouters,
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -121,13 +119,8 @@ func (t *TokenSource) Update(ctx context.Context) error {
|
||||
ctx,
|
||||
routerClient,
|
||||
mantraev1.RouterType_ROUTER_TYPE_UDP,
|
||||
func() map[string]any {
|
||||
m := make(map[string]any, len(dyn.UDP.Routers))
|
||||
for k, v := range dyn.UDP.Routers {
|
||||
m[k] = v
|
||||
}
|
||||
return m
|
||||
}(),
|
||||
ToAnyMap(dyn.UDP.Routers),
|
||||
syncedRouters,
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -137,13 +130,8 @@ func (t *TokenSource) Update(ctx context.Context) error {
|
||||
ctx,
|
||||
serviceClient,
|
||||
mantraev1.ServiceType_SERVICE_TYPE_HTTP,
|
||||
func() map[string]any {
|
||||
m := make(map[string]any, len(dyn.HTTP.Services))
|
||||
for k, v := range dyn.HTTP.Services {
|
||||
m[k] = v
|
||||
}
|
||||
return m
|
||||
}(),
|
||||
ToAnyMap(dyn.HTTP.Services),
|
||||
syncedServices,
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -151,13 +139,8 @@ func (t *TokenSource) Update(ctx context.Context) error {
|
||||
ctx,
|
||||
serviceClient,
|
||||
mantraev1.ServiceType_SERVICE_TYPE_TCP,
|
||||
func() map[string]any {
|
||||
m := make(map[string]any, len(dyn.TCP.Services))
|
||||
for k, v := range dyn.TCP.Services {
|
||||
m[k] = v
|
||||
}
|
||||
return m
|
||||
}(),
|
||||
ToAnyMap(dyn.TCP.Services),
|
||||
syncedServices,
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -165,13 +148,8 @@ func (t *TokenSource) Update(ctx context.Context) error {
|
||||
ctx,
|
||||
serviceClient,
|
||||
mantraev1.ServiceType_SERVICE_TYPE_UDP,
|
||||
func() map[string]any {
|
||||
m := make(map[string]any, len(dyn.UDP.Services))
|
||||
for k, v := range dyn.UDP.Services {
|
||||
m[k] = v
|
||||
}
|
||||
return m
|
||||
}(),
|
||||
ToAnyMap(dyn.UDP.Services),
|
||||
syncedServices,
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -181,13 +159,8 @@ func (t *TokenSource) Update(ctx context.Context) error {
|
||||
ctx,
|
||||
middlewareClient,
|
||||
mantraev1.MiddlewareType_MIDDLEWARE_TYPE_HTTP,
|
||||
func() map[string]any {
|
||||
m := make(map[string]any, len(dyn.HTTP.Middlewares))
|
||||
for k, v := range dyn.HTTP.Middlewares {
|
||||
m[k] = v
|
||||
}
|
||||
return m
|
||||
}(),
|
||||
ToAnyMap(dyn.HTTP.Middlewares),
|
||||
syncedMiddlewares,
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -195,19 +168,22 @@ func (t *TokenSource) Update(ctx context.Context) error {
|
||||
ctx,
|
||||
middlewareClient,
|
||||
mantraev1.MiddlewareType_MIDDLEWARE_TYPE_TCP,
|
||||
func() map[string]any {
|
||||
m := make(map[string]any, len(dyn.TCP.Middlewares))
|
||||
for k, v := range dyn.TCP.Middlewares {
|
||||
m[k] = v
|
||||
}
|
||||
return m
|
||||
}(),
|
||||
ToAnyMap(dyn.TCP.Middlewares),
|
||||
syncedMiddlewares,
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
return t.cleanup(
|
||||
ctx,
|
||||
routerClient,
|
||||
serviceClient,
|
||||
middlewareClient,
|
||||
syncedRouters,
|
||||
syncedServices,
|
||||
syncedMiddlewares,
|
||||
)
|
||||
}
|
||||
|
||||
func injectServiceAddresses(d *dynamic.Configuration, ip string, port uint16) {
|
||||
@@ -228,49 +204,61 @@ func (t *TokenSource) upsertRouters(
|
||||
client mantraev1connect.RouterServiceClient,
|
||||
typ mantraev1.RouterType,
|
||||
routers map[string]any,
|
||||
synced map[string]struct{},
|
||||
) error {
|
||||
listReq := connect.NewRequest(
|
||||
&mantraev1.ListRoutersRequest{ProfileId: t.claims.ProfileID, Type: &typ},
|
||||
)
|
||||
listResp, err := client.ListRouters(ctx, listReq)
|
||||
res, err := client.ListRouters(ctx, connect.NewRequest(&mantraev1.ListRoutersRequest{
|
||||
ProfileId: t.claims.ProfileID,
|
||||
AgentId: &t.claims.AgentID,
|
||||
Type: &typ,
|
||||
}))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
existing := make(map[string]int64, len(listResp.Msg.Routers))
|
||||
for _, r := range listResp.Msg.Routers {
|
||||
existing[r.Name] = r.Id
|
||||
|
||||
existing := make(map[string]*mantraev1.Router, len(res.Msg.Routers))
|
||||
for _, r := range res.Msg.Routers {
|
||||
existing[r.Name] = r
|
||||
}
|
||||
|
||||
for name, cfg := range routers {
|
||||
s, err := ToProtoStruct(cfg)
|
||||
synced[name] = struct{}{}
|
||||
newConfig, err := ToProtoStruct(cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if id, found := existing[name]; found {
|
||||
upd := &mantraev1.UpdateRouterRequest{
|
||||
Id: id,
|
||||
|
||||
if r, found := existing[name]; found {
|
||||
if proto.Equal(r.Config, newConfig) {
|
||||
slog.Debug("Skipped updating router", "name", name, "id", r.Id)
|
||||
continue
|
||||
}
|
||||
params := &mantraev1.UpdateRouterRequest{
|
||||
Id: r.Id,
|
||||
Name: name,
|
||||
Config: s,
|
||||
Config: newConfig,
|
||||
Enabled: true,
|
||||
Type: typ,
|
||||
}
|
||||
if _, err := client.UpdateRouter(ctx, connect.NewRequest(upd)); err != nil {
|
||||
if _, err := client.UpdateRouter(ctx, connect.NewRequest(params)); err != nil {
|
||||
return err
|
||||
}
|
||||
slog.Debug("Updated router", "name", name, "id", r.Id)
|
||||
} else {
|
||||
cr := &mantraev1.CreateRouterRequest{
|
||||
params := &mantraev1.CreateRouterRequest{
|
||||
ProfileId: t.claims.ProfileID,
|
||||
AgentId: t.claims.AgentID,
|
||||
Name: name,
|
||||
Config: s,
|
||||
Config: newConfig,
|
||||
Enabled: true,
|
||||
Type: typ,
|
||||
}
|
||||
if _, err := client.CreateRouter(ctx, connect.NewRequest(cr)); err != nil {
|
||||
if _, err := client.CreateRouter(ctx, connect.NewRequest(params)); err != nil {
|
||||
return err
|
||||
}
|
||||
slog.Debug("Created router", "name", name, "id", r.Id)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -279,41 +267,59 @@ func (t *TokenSource) upsertServices(
|
||||
client mantraev1connect.ServiceServiceClient,
|
||||
typ mantraev1.ServiceType,
|
||||
services map[string]any,
|
||||
synced map[string]struct{},
|
||||
) error {
|
||||
listReq := connect.NewRequest(
|
||||
&mantraev1.ListServicesRequest{ProfileId: t.claims.ProfileID, Type: &typ},
|
||||
)
|
||||
listResp, err := client.ListServices(ctx, listReq)
|
||||
res, err := client.ListServices(ctx, connect.NewRequest(&mantraev1.ListServicesRequest{
|
||||
ProfileId: t.claims.ProfileID,
|
||||
AgentId: &t.claims.AgentID,
|
||||
Type: &typ,
|
||||
}))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
existing := make(map[string]int64, len(listResp.Msg.Services))
|
||||
for _, s := range listResp.Msg.Services {
|
||||
existing[s.Name] = s.Id
|
||||
|
||||
existing := make(map[string]*mantraev1.Service, len(res.Msg.Services))
|
||||
for _, s := range res.Msg.Services {
|
||||
existing[s.Name] = s
|
||||
}
|
||||
|
||||
for name, cfg := range services {
|
||||
s, err := ToProtoStruct(cfg)
|
||||
synced[name] = struct{}{}
|
||||
newConfig, err := ToProtoStruct(cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if id, found := existing[name]; found {
|
||||
upd := &mantraev1.UpdateServiceRequest{Id: id, Name: name, Config: s, Type: typ}
|
||||
if _, err := client.UpdateService(ctx, connect.NewRequest(upd)); err != nil {
|
||||
|
||||
if s, found := existing[name]; found {
|
||||
if proto.Equal(s.Config, newConfig) {
|
||||
slog.Debug("Skipped updating service", "name", name, "id", s.Id)
|
||||
continue
|
||||
}
|
||||
params := &mantraev1.UpdateServiceRequest{
|
||||
Id: s.Id,
|
||||
Name: name,
|
||||
Config: newConfig,
|
||||
Type: typ,
|
||||
}
|
||||
if _, err := client.UpdateService(ctx, connect.NewRequest(params)); err != nil {
|
||||
return err
|
||||
}
|
||||
slog.Debug("Updated service", "name", name, "id", s.Id)
|
||||
} else {
|
||||
cr := &mantraev1.CreateServiceRequest{
|
||||
params := &mantraev1.CreateServiceRequest{
|
||||
ProfileId: t.claims.ProfileID,
|
||||
AgentId: t.claims.AgentID,
|
||||
Name: name,
|
||||
Config: s,
|
||||
Config: newConfig,
|
||||
Type: typ,
|
||||
}
|
||||
if _, err := client.CreateService(ctx, connect.NewRequest(cr)); err != nil {
|
||||
if _, err := client.CreateService(ctx, connect.NewRequest(params)); err != nil {
|
||||
return err
|
||||
}
|
||||
slog.Debug("Created service", "name", name, "id", s.Id)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -322,44 +328,155 @@ func (t *TokenSource) upsertMiddlewares(
|
||||
client mantraev1connect.MiddlewareServiceClient,
|
||||
typ mantraev1.MiddlewareType,
|
||||
middlewares map[string]any,
|
||||
synced map[string]struct{},
|
||||
) error {
|
||||
listReq := connect.NewRequest(
|
||||
&mantraev1.ListMiddlewaresRequest{ProfileId: t.claims.ProfileID, Type: &typ},
|
||||
)
|
||||
listResp, err := client.ListMiddlewares(ctx, listReq)
|
||||
res, err := client.ListMiddlewares(ctx, connect.NewRequest(&mantraev1.ListMiddlewaresRequest{
|
||||
ProfileId: t.claims.ProfileID,
|
||||
AgentId: &t.claims.AgentID,
|
||||
Type: &typ,
|
||||
}))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
existing := make(map[string]int64, len(listResp.Msg.Middlewares))
|
||||
for _, m := range listResp.Msg.Middlewares {
|
||||
existing[m.Name] = m.Id
|
||||
|
||||
existing := make(map[string]*mantraev1.Middleware, len(res.Msg.Middlewares))
|
||||
for _, m := range res.Msg.Middlewares {
|
||||
existing[m.Name] = m
|
||||
}
|
||||
|
||||
for name, cfg := range middlewares {
|
||||
s, err := ToProtoStruct(cfg)
|
||||
synced[name] = struct{}{}
|
||||
newConfig, err := ToProtoStruct(cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if id, found := existing[name]; found {
|
||||
upd := &mantraev1.UpdateMiddlewareRequest{Id: id, Name: name, Config: s, Type: typ}
|
||||
if _, err := client.UpdateMiddleware(ctx, connect.NewRequest(upd)); err != nil {
|
||||
|
||||
if m, found := existing[name]; found {
|
||||
if proto.Equal(m.Config, newConfig) {
|
||||
slog.Debug("Skipped updating middleware", "name", name, "id", m.Id)
|
||||
continue
|
||||
}
|
||||
params := &mantraev1.UpdateMiddlewareRequest{
|
||||
Id: m.Id,
|
||||
Name: name,
|
||||
Config: newConfig,
|
||||
Type: typ,
|
||||
}
|
||||
if _, err := client.UpdateMiddleware(ctx, connect.NewRequest(params)); err != nil {
|
||||
return err
|
||||
}
|
||||
slog.Debug("Updated middleware", "name", name, "id", m.Id)
|
||||
} else {
|
||||
cr := &mantraev1.CreateMiddlewareRequest{
|
||||
params := &mantraev1.CreateMiddlewareRequest{
|
||||
ProfileId: t.claims.ProfileID,
|
||||
AgentId: t.claims.AgentID,
|
||||
Name: name,
|
||||
Config: s,
|
||||
Config: newConfig,
|
||||
Type: typ,
|
||||
}
|
||||
if _, err := client.CreateMiddleware(ctx, connect.NewRequest(cr)); err != nil {
|
||||
if _, err := client.CreateMiddleware(ctx, connect.NewRequest(params)); err != nil {
|
||||
return err
|
||||
}
|
||||
slog.Debug("Created middleware", "name", name, "id", m.Id)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// cleanup removes all stale resources
|
||||
func (t *TokenSource) cleanup(
|
||||
ctx context.Context,
|
||||
routerClient mantraev1connect.RouterServiceClient,
|
||||
serviceClient mantraev1connect.ServiceServiceClient,
|
||||
middlewareClient mantraev1connect.MiddlewareServiceClient,
|
||||
syncedRouters map[string]struct{},
|
||||
syncedServices map[string]struct{},
|
||||
syncedMiddlewares map[string]struct{},
|
||||
) error {
|
||||
// Cleanup Routers
|
||||
routers, err := routerClient.ListRouters(ctx, connect.NewRequest(&mantraev1.ListRoutersRequest{
|
||||
ProfileId: t.claims.ProfileID,
|
||||
AgentId: &t.claims.AgentID,
|
||||
}))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, r := range routers.Msg.Routers {
|
||||
if _, ok := syncedRouters[r.Name]; !ok {
|
||||
if _, err := routerClient.DeleteRouter(
|
||||
ctx,
|
||||
connect.NewRequest(&mantraev1.DeleteRouterRequest{Id: r.Id, Type: r.Type}),
|
||||
); err != nil {
|
||||
slog.Error("Failed to delete stale router", "name", r.Name, "err", err)
|
||||
} else {
|
||||
slog.Info("Deleted stale router", "name", r.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Cleanup Services
|
||||
services, err := serviceClient.ListServices(
|
||||
ctx,
|
||||
connect.NewRequest(&mantraev1.ListServicesRequest{
|
||||
ProfileId: t.claims.ProfileID,
|
||||
AgentId: &t.claims.AgentID,
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, s := range services.Msg.Services {
|
||||
if _, ok := syncedServices[s.Name]; !ok {
|
||||
if _, err := serviceClient.DeleteService(
|
||||
ctx,
|
||||
connect.NewRequest(&mantraev1.DeleteServiceRequest{Id: s.Id, Type: s.Type}),
|
||||
); err != nil {
|
||||
slog.Error("Failed to delete stale service", "name", s.Name, "err", err)
|
||||
} else {
|
||||
slog.Info("Deleted stale service", "name", s.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Cleanup Middlewares
|
||||
middlewares, err := middlewareClient.ListMiddlewares(
|
||||
ctx,
|
||||
connect.NewRequest(&mantraev1.ListMiddlewaresRequest{
|
||||
ProfileId: t.claims.ProfileID,
|
||||
AgentId: &t.claims.AgentID,
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, m := range middlewares.Msg.Middlewares {
|
||||
if _, ok := syncedMiddlewares[m.Name]; !ok {
|
||||
if _, err := middlewareClient.DeleteMiddleware(
|
||||
ctx,
|
||||
connect.NewRequest(&mantraev1.DeleteMiddlewareRequest{Id: m.Id, Type: m.Type}),
|
||||
); err != nil {
|
||||
slog.Error("Failed to delete stale middleware", "name", m.Name, "err", err)
|
||||
} else {
|
||||
slog.Info("Deleted stale middleware", "name", m.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ToAnyMap converts a map[string]T to map[string]any
|
||||
func ToAnyMap[T any](in map[string]T) map[string]any {
|
||||
out := make(map[string]any, len(in))
|
||||
for k, v := range in {
|
||||
out[k] = v
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// ToProtoStruct converts any Go struct to *structpb.Struct
|
||||
func ToProtoStruct(v any) (*structpb.Struct, error) {
|
||||
data, err := json.Marshal(v)
|
||||
|
||||
@@ -12,35 +12,42 @@ import (
|
||||
|
||||
// GetContainers retrieves all local containers
|
||||
func GetContainers() ([]types.Container, error) {
|
||||
// Create a new Docker client
|
||||
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||
if err != nil {
|
||||
return nil, errors.New("failed to create Docker client")
|
||||
}
|
||||
|
||||
// Get all containers
|
||||
containers, err := cli.ContainerList(context.Background(), container.ListOptions{})
|
||||
containers, err := cli.ContainerList(
|
||||
context.Background(),
|
||||
container.ListOptions{All: false},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, errors.New("failed to list containers")
|
||||
}
|
||||
|
||||
var result []types.Container
|
||||
// portMap := make(map[int32]int32)
|
||||
|
||||
// Iterate over each container and populate the Container struct
|
||||
for _, c := range containers {
|
||||
// Skip Traefik
|
||||
// Skip Traefik by name
|
||||
skip := false
|
||||
for _, name := range c.Names {
|
||||
if strings.Contains(strings.ToLower(name), "traefik") {
|
||||
continue
|
||||
skip = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if skip {
|
||||
continue
|
||||
}
|
||||
|
||||
// Populate PortInfo
|
||||
// for _, p := range c.Ports {
|
||||
// fmt.Printf("%s:%d -> %d/%s\n", p.IP, p.PublicPort, p.PrivatePort, p.Type)
|
||||
// // portMap[int32(p.PublicPort)] = int32(p.PrivatePort)
|
||||
// }
|
||||
// Must have at least one exposed port
|
||||
if len(c.Ports) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
// Must have at least one label
|
||||
if len(c.Labels) == 0 {
|
||||
continue
|
||||
}
|
||||
result = append(result, c)
|
||||
}
|
||||
|
||||
|
||||
@@ -213,56 +213,88 @@ func (s *MiddlewareService) ListMiddlewares(
|
||||
var totalCount int64
|
||||
|
||||
if req.Msg.Type == nil {
|
||||
httpMiddlewares, totalHttp, err := listMiddlewares[db.HttpMiddleware, mantraev1.Middleware, db.ListHttpMiddlewaresParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpMiddlewares,
|
||||
s.app.Conn.GetQuery().CountHttpMiddlewares,
|
||||
buildProtoHttpMiddleware,
|
||||
db.ListHttpMiddlewaresParams{
|
||||
ProfileID: req.Msg.ProfileId,
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
},
|
||||
)
|
||||
var err error
|
||||
if req.Msg.AgentId == nil {
|
||||
middlewares, totalCount, err = listMiddlewares[db.ListMiddlewaresByProfileRow, mantraev1.Middleware, db.ListMiddlewaresByProfileParams, db.CountMiddlewaresByProfileParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListMiddlewaresByProfile,
|
||||
s.app.Conn.GetQuery().CountMiddlewaresByProfile,
|
||||
buildMiddlewaresByProfile,
|
||||
db.ListMiddlewaresByProfileParams{
|
||||
ProfileID: req.Msg.ProfileId,
|
||||
ProfileID_2: req.Msg.ProfileId,
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
},
|
||||
db.CountMiddlewaresByProfileParams{
|
||||
ProfileID: req.Msg.ProfileId,
|
||||
ProfileID_2: req.Msg.ProfileId,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
middlewares, totalCount, err = listMiddlewares[db.ListMiddlewaresByAgentRow, mantraev1.Middleware, db.ListMiddlewaresByAgentParams, db.CountMiddlewaresByAgentParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListMiddlewaresByAgent,
|
||||
s.app.Conn.GetQuery().CountMiddlewaresByAgent,
|
||||
buildMiddlewaresByAgent,
|
||||
db.ListMiddlewaresByAgentParams{
|
||||
AgentID: req.Msg.AgentId,
|
||||
AgentID_2: req.Msg.AgentId,
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
},
|
||||
db.CountMiddlewaresByAgentParams{
|
||||
AgentID: req.Msg.AgentId,
|
||||
AgentID_2: req.Msg.AgentId,
|
||||
},
|
||||
)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
tcpMiddlewares, totalTcp, err := listMiddlewares[db.TcpMiddleware, mantraev1.Middleware, db.ListTcpMiddlewaresParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpMiddlewares,
|
||||
s.app.Conn.GetQuery().CountTcpMiddlewares,
|
||||
buildProtoTcpMiddleware,
|
||||
db.ListTcpMiddlewaresParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
middlewares = append(middlewares, httpMiddlewares...)
|
||||
middlewares = append(middlewares, tcpMiddlewares...)
|
||||
totalCount = totalHttp + totalTcp
|
||||
} else {
|
||||
var err error
|
||||
switch *req.Msg.Type {
|
||||
case mantraev1.MiddlewareType_MIDDLEWARE_TYPE_HTTP:
|
||||
middlewares, totalCount, err = listMiddlewares[db.HttpMiddleware, mantraev1.Middleware, db.ListHttpMiddlewaresParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpMiddlewares,
|
||||
s.app.Conn.GetQuery().CountHttpMiddlewares,
|
||||
buildProtoHttpMiddleware,
|
||||
db.ListHttpMiddlewaresParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if req.Msg.AgentId == nil {
|
||||
middlewares, totalCount, err = listMiddlewares[db.HttpMiddleware, mantraev1.Middleware, db.ListHttpMiddlewaresParams, int64](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpMiddlewares,
|
||||
s.app.Conn.GetQuery().CountHttpMiddlewaresByProfile,
|
||||
buildProtoHttpMiddleware,
|
||||
db.ListHttpMiddlewaresParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
req.Msg.ProfileId,
|
||||
)
|
||||
} else {
|
||||
middlewares, totalCount, err = listMiddlewares[db.HttpMiddleware, mantraev1.Middleware, db.ListHttpMiddlewaresByAgentParams, *string](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpMiddlewaresByAgent,
|
||||
s.app.Conn.GetQuery().CountHttpMiddlewaresByAgent,
|
||||
buildProtoHttpMiddleware,
|
||||
db.ListHttpMiddlewaresByAgentParams{AgentID: req.Msg.AgentId, Limit: limit, Offset: offset},
|
||||
req.Msg.AgentId,
|
||||
)
|
||||
}
|
||||
|
||||
case mantraev1.MiddlewareType_MIDDLEWARE_TYPE_TCP:
|
||||
middlewares, totalCount, err = listMiddlewares[db.TcpMiddleware, mantraev1.Middleware, db.ListTcpMiddlewaresParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpMiddlewares,
|
||||
s.app.Conn.GetQuery().CountTcpMiddlewares,
|
||||
buildProtoTcpMiddleware,
|
||||
db.ListTcpMiddlewaresParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
if req.Msg.AgentId == nil {
|
||||
middlewares, totalCount, err = listMiddlewares[db.TcpMiddleware, mantraev1.Middleware, db.ListTcpMiddlewaresParams, int64](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpMiddlewares,
|
||||
s.app.Conn.GetQuery().CountTcpMiddlewaresByProfile,
|
||||
buildProtoTcpMiddleware,
|
||||
db.ListTcpMiddlewaresParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
req.Msg.ProfileId,
|
||||
)
|
||||
} else {
|
||||
middlewares, totalCount, err = listMiddlewares[db.TcpMiddleware, mantraev1.Middleware, db.ListTcpMiddlewaresByAgentParams, *string](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpMiddlewaresByAgent,
|
||||
s.app.Conn.GetQuery().CountTcpMiddlewaresByAgent,
|
||||
buildProtoTcpMiddleware,
|
||||
db.ListTcpMiddlewaresByAgentParams{AgentID: req.Msg.AgentId, Limit: limit, Offset: offset},
|
||||
req.Msg.AgentId,
|
||||
)
|
||||
}
|
||||
|
||||
default:
|
||||
@@ -287,20 +319,22 @@ func (s *MiddlewareService) ListMiddlewares(
|
||||
func listMiddlewares[
|
||||
DBType any,
|
||||
ProtoType any,
|
||||
ParamsType any,
|
||||
ListParams any,
|
||||
CountParams any,
|
||||
](
|
||||
ctx context.Context,
|
||||
listFn func(context.Context, ParamsType) ([]DBType, error),
|
||||
countFn func(context.Context) (int64, error),
|
||||
listFn func(context.Context, ListParams) ([]DBType, error),
|
||||
countFn func(context.Context, CountParams) (int64, error),
|
||||
buildFn func(DBType) (*mantraev1.Middleware, error),
|
||||
params ParamsType,
|
||||
listParams ListParams,
|
||||
countParams CountParams,
|
||||
) ([]*mantraev1.Middleware, int64, error) {
|
||||
dbMiddlewares, err := listFn(ctx, params)
|
||||
dbMiddlewares, err := listFn(ctx, listParams)
|
||||
if err != nil {
|
||||
return nil, 0, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
totalCount, err := countFn(ctx)
|
||||
totalCount, err := countFn(ctx, countParams)
|
||||
if err != nil {
|
||||
return nil, 0, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
@@ -318,6 +352,78 @@ func listMiddlewares[
|
||||
return middlewares, totalCount, nil
|
||||
}
|
||||
|
||||
func buildMiddlewaresByProfile(r db.ListMiddlewaresByProfileRow) (*mantraev1.Middleware, error) {
|
||||
config, err := MarshalStruct(r.Config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to marshal middleware config: %w", err)
|
||||
}
|
||||
var middleware mantraev1.Middleware
|
||||
switch r.Type {
|
||||
case "http":
|
||||
middleware = mantraev1.Middleware{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.MiddlewareType_MIDDLEWARE_TYPE_HTTP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "tcp":
|
||||
middleware = mantraev1.Middleware{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.MiddlewareType_MIDDLEWARE_TYPE_TCP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid middleware type: %s", r.Type)
|
||||
}
|
||||
|
||||
return &middleware, nil
|
||||
}
|
||||
|
||||
func buildMiddlewaresByAgent(r db.ListMiddlewaresByAgentRow) (*mantraev1.Middleware, error) {
|
||||
config, err := MarshalStruct(r.Config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to marshal middleware config: %w", err)
|
||||
}
|
||||
var middleware mantraev1.Middleware
|
||||
switch r.Type {
|
||||
case "http":
|
||||
middleware = mantraev1.Middleware{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.MiddlewareType_MIDDLEWARE_TYPE_HTTP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "tcp":
|
||||
middleware = mantraev1.Middleware{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.MiddlewareType_MIDDLEWARE_TYPE_TCP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid middleware type: %s", r.Type)
|
||||
}
|
||||
|
||||
return &middleware, nil
|
||||
}
|
||||
|
||||
func buildProtoHttpMiddleware(r db.HttpMiddleware) (*mantraev1.Middleware, error) {
|
||||
config, err := MarshalStruct(r.Config)
|
||||
if err != nil {
|
||||
|
||||
@@ -319,70 +319,114 @@ func (s *RouterService) ListRouters(
|
||||
var totalCount int64
|
||||
|
||||
if req.Msg.Type == nil {
|
||||
httpRouters, totalHttp, err := listRouters[db.HttpRouter, mantraev1.Router, db.ListHttpRoutersParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpRouters,
|
||||
s.app.Conn.GetQuery().CountHttpRouters,
|
||||
buildProtoHttpRouter,
|
||||
db.ListHttpRoutersParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
var err error
|
||||
if req.Msg.AgentId == nil {
|
||||
routers, totalCount, err = listRouters[db.ListRoutersByProfileRow, mantraev1.Router, db.ListRoutersByProfileParams, db.CountRoutersByProfileParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListRoutersByProfile,
|
||||
s.app.Conn.GetQuery().CountRoutersByProfile,
|
||||
buildRoutersByProfile,
|
||||
db.ListRoutersByProfileParams{
|
||||
ProfileID: req.Msg.ProfileId,
|
||||
ProfileID_2: req.Msg.ProfileId,
|
||||
ProfileID_3: req.Msg.ProfileId,
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
},
|
||||
db.CountRoutersByProfileParams{
|
||||
ProfileID: req.Msg.ProfileId,
|
||||
ProfileID_2: req.Msg.ProfileId,
|
||||
ProfileID_3: req.Msg.ProfileId,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
routers, totalCount, err = listRouters[db.ListRoutersByAgentRow, mantraev1.Router, db.ListRoutersByAgentParams, db.CountRoutersByAgentParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListRoutersByAgent,
|
||||
s.app.Conn.GetQuery().CountRoutersByAgent,
|
||||
buildRoutersByAgent,
|
||||
db.ListRoutersByAgentParams{
|
||||
AgentID: req.Msg.AgentId,
|
||||
AgentID_2: req.Msg.AgentId,
|
||||
AgentID_3: req.Msg.AgentId,
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
},
|
||||
db.CountRoutersByAgentParams{
|
||||
AgentID: req.Msg.AgentId,
|
||||
AgentID_2: req.Msg.AgentId,
|
||||
AgentID_3: req.Msg.AgentId,
|
||||
},
|
||||
)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
tcpRouters, totalTcp, err := listRouters[db.TcpRouter, mantraev1.Router, db.ListTcpRoutersParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpRouters,
|
||||
s.app.Conn.GetQuery().CountTcpRouters,
|
||||
buildProtoTcpRouter,
|
||||
db.ListTcpRoutersParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
udpRouters, totalUdp, err := listRouters[db.UdpRouter, mantraev1.Router, db.ListUdpRoutersParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListUdpRouters,
|
||||
s.app.Conn.GetQuery().CountUdpRouters,
|
||||
buildProtoUdpRouter,
|
||||
db.ListUdpRoutersParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
routers = append(routers, httpRouters...)
|
||||
routers = append(routers, tcpRouters...)
|
||||
routers = append(routers, udpRouters...)
|
||||
totalCount = totalHttp + totalTcp + totalUdp
|
||||
} else {
|
||||
var err error
|
||||
switch *req.Msg.Type {
|
||||
case mantraev1.RouterType_ROUTER_TYPE_HTTP:
|
||||
routers, totalCount, err = listRouters[db.HttpRouter, mantraev1.Router, db.ListHttpRoutersParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpRouters,
|
||||
s.app.Conn.GetQuery().CountHttpRouters,
|
||||
buildProtoHttpRouter,
|
||||
db.ListHttpRoutersParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if req.Msg.AgentId == nil {
|
||||
routers, totalCount, err = listRouters[db.HttpRouter, mantraev1.Router, db.ListHttpRoutersParams, int64](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpRouters,
|
||||
s.app.Conn.GetQuery().CountHttpRoutersByProfile,
|
||||
buildProtoHttpRouter,
|
||||
db.ListHttpRoutersParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
req.Msg.ProfileId,
|
||||
)
|
||||
} else {
|
||||
routers, totalCount, err = listRouters[db.HttpRouter, mantraev1.Router, db.ListHttpRoutersByAgentParams, *string](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpRoutersByAgent,
|
||||
s.app.Conn.GetQuery().CountHttpRoutersByAgent,
|
||||
buildProtoHttpRouter,
|
||||
db.ListHttpRoutersByAgentParams{AgentID: req.Msg.AgentId, Limit: limit, Offset: offset},
|
||||
req.Msg.AgentId,
|
||||
)
|
||||
}
|
||||
|
||||
case mantraev1.RouterType_ROUTER_TYPE_TCP:
|
||||
routers, totalCount, err = listRouters[db.TcpRouter, mantraev1.Router, db.ListTcpRoutersParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpRouters,
|
||||
s.app.Conn.GetQuery().CountTcpRouters,
|
||||
buildProtoTcpRouter,
|
||||
db.ListTcpRoutersParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if req.Msg.AgentId == nil {
|
||||
routers, totalCount, err = listRouters[db.TcpRouter, mantraev1.Router, db.ListTcpRoutersParams, int64](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpRouters,
|
||||
s.app.Conn.GetQuery().CountTcpRoutersByProfile,
|
||||
buildProtoTcpRouter,
|
||||
db.ListTcpRoutersParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
req.Msg.ProfileId,
|
||||
)
|
||||
} else {
|
||||
routers, totalCount, err = listRouters[db.TcpRouter, mantraev1.Router, db.ListTcpRoutersByAgentParams, *string](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpRoutersByAgent,
|
||||
s.app.Conn.GetQuery().CountTcpRoutersByAgent,
|
||||
buildProtoTcpRouter,
|
||||
db.ListTcpRoutersByAgentParams{AgentID: req.Msg.AgentId, Limit: limit, Offset: offset},
|
||||
req.Msg.AgentId,
|
||||
)
|
||||
}
|
||||
|
||||
case mantraev1.RouterType_ROUTER_TYPE_UDP:
|
||||
routers, totalCount, err = listRouters[db.UdpRouter, mantraev1.Router, db.ListUdpRoutersParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListUdpRouters,
|
||||
s.app.Conn.GetQuery().CountUdpRouters,
|
||||
buildProtoUdpRouter,
|
||||
db.ListUdpRoutersParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if req.Msg.AgentId == nil {
|
||||
routers, totalCount, err = listRouters[db.UdpRouter, mantraev1.Router, db.ListUdpRoutersParams, int64](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListUdpRouters,
|
||||
s.app.Conn.GetQuery().CountUdpRoutersByProfile,
|
||||
buildProtoUdpRouter,
|
||||
db.ListUdpRoutersParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
req.Msg.ProfileId,
|
||||
)
|
||||
} else {
|
||||
routers, totalCount, err = listRouters[db.UdpRouter, mantraev1.Router, db.ListUdpRoutersByAgentParams, *string](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListUdpRoutersByAgent,
|
||||
s.app.Conn.GetQuery().CountUdpRoutersByAgent,
|
||||
buildProtoUdpRouter,
|
||||
db.ListUdpRoutersByAgentParams{AgentID: req.Msg.AgentId, Limit: limit, Offset: offset},
|
||||
req.Msg.AgentId,
|
||||
)
|
||||
}
|
||||
|
||||
default:
|
||||
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("invalid router type"))
|
||||
@@ -403,20 +447,22 @@ func (s *RouterService) ListRouters(
|
||||
func listRouters[
|
||||
DBType any,
|
||||
ProtoType any,
|
||||
ParamsType any,
|
||||
ListParams any,
|
||||
CountParams any,
|
||||
](
|
||||
ctx context.Context,
|
||||
listFn func(context.Context, ParamsType) ([]DBType, error),
|
||||
countFn func(context.Context) (int64, error),
|
||||
listFn func(context.Context, ListParams) ([]DBType, error),
|
||||
countFn func(context.Context, CountParams) (int64, error),
|
||||
buildFn func(DBType) (*mantraev1.Router, error),
|
||||
params ParamsType,
|
||||
listParams ListParams,
|
||||
countParams CountParams,
|
||||
) ([]*mantraev1.Router, int64, error) {
|
||||
dbRouters, err := listFn(ctx, params)
|
||||
dbRouters, err := listFn(ctx, listParams)
|
||||
if err != nil {
|
||||
return nil, 0, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
totalCount, err := countFn(ctx)
|
||||
totalCount, err := countFn(ctx, countParams)
|
||||
if err != nil {
|
||||
return nil, 0, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
@@ -434,6 +480,106 @@ func listRouters[
|
||||
return routers, totalCount, nil
|
||||
}
|
||||
|
||||
func buildRoutersByProfile(r db.ListRoutersByProfileRow) (*mantraev1.Router, error) {
|
||||
config, err := MarshalStruct(r.Config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to marshal router config: %w", err)
|
||||
}
|
||||
var router mantraev1.Router
|
||||
switch r.Type {
|
||||
case "http":
|
||||
router = mantraev1.Router{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Enabled: r.Enabled,
|
||||
Type: mantraev1.RouterType_ROUTER_TYPE_HTTP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "tcp":
|
||||
router = mantraev1.Router{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Enabled: r.Enabled,
|
||||
Type: mantraev1.RouterType_ROUTER_TYPE_TCP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "udp":
|
||||
router = mantraev1.Router{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Enabled: r.Enabled,
|
||||
Type: mantraev1.RouterType_ROUTER_TYPE_UDP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid router type: %s", r.Type)
|
||||
}
|
||||
|
||||
return &router, nil
|
||||
}
|
||||
|
||||
func buildRoutersByAgent(r db.ListRoutersByAgentRow) (*mantraev1.Router, error) {
|
||||
config, err := MarshalStruct(r.Config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to marshal router config: %w", err)
|
||||
}
|
||||
var router mantraev1.Router
|
||||
switch r.Type {
|
||||
case "http":
|
||||
router = mantraev1.Router{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Enabled: r.Enabled,
|
||||
Type: mantraev1.RouterType_ROUTER_TYPE_HTTP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "tcp":
|
||||
router = mantraev1.Router{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Enabled: r.Enabled,
|
||||
Type: mantraev1.RouterType_ROUTER_TYPE_TCP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "udp":
|
||||
router = mantraev1.Router{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Enabled: r.Enabled,
|
||||
Type: mantraev1.RouterType_ROUTER_TYPE_UDP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid router type: %s", r.Type)
|
||||
}
|
||||
|
||||
return &router, nil
|
||||
}
|
||||
|
||||
func buildProtoHttpRouter(r db.HttpRouter) (*mantraev1.Router, error) {
|
||||
config, err := MarshalStruct(r.Config)
|
||||
if err != nil {
|
||||
|
||||
@@ -249,70 +249,114 @@ func (s *Service) ListServices(
|
||||
var totalCount int64
|
||||
|
||||
if req.Msg.Type == nil {
|
||||
httpServices, totalHttp, err := listServices[db.HttpService, mantraev1.Service, db.ListHttpServicesParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpServices,
|
||||
s.app.Conn.GetQuery().CountHttpServices,
|
||||
buildProtoHttpService,
|
||||
db.ListHttpServicesParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
var err error
|
||||
if req.Msg.AgentId == nil {
|
||||
services, totalCount, err = listServices[db.ListServicesByProfileRow, mantraev1.Service, db.ListServicesByProfileParams, db.CountServicesByProfileParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListServicesByProfile,
|
||||
s.app.Conn.GetQuery().CountServicesByProfile,
|
||||
buildServicesByProfile,
|
||||
db.ListServicesByProfileParams{
|
||||
ProfileID: req.Msg.ProfileId,
|
||||
ProfileID_2: req.Msg.ProfileId,
|
||||
ProfileID_3: req.Msg.ProfileId,
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
},
|
||||
db.CountServicesByProfileParams{
|
||||
ProfileID: req.Msg.ProfileId,
|
||||
ProfileID_2: req.Msg.ProfileId,
|
||||
ProfileID_3: req.Msg.ProfileId,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
services, totalCount, err = listServices[db.ListServicesByAgentRow, mantraev1.Service, db.ListServicesByAgentParams, db.CountServicesByAgentParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListServicesByAgent,
|
||||
s.app.Conn.GetQuery().CountServicesByAgent,
|
||||
buildServicesByAgent,
|
||||
db.ListServicesByAgentParams{
|
||||
AgentID: req.Msg.AgentId,
|
||||
AgentID_2: req.Msg.AgentId,
|
||||
AgentID_3: req.Msg.AgentId,
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
},
|
||||
db.CountServicesByAgentParams{
|
||||
AgentID: req.Msg.AgentId,
|
||||
AgentID_2: req.Msg.AgentId,
|
||||
AgentID_3: req.Msg.AgentId,
|
||||
},
|
||||
)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
tcpServices, totalTcp, err := listServices[db.TcpService, mantraev1.Service, db.ListTcpServicesParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpServices,
|
||||
s.app.Conn.GetQuery().CountTcpServices,
|
||||
buildProtoTcpService,
|
||||
db.ListTcpServicesParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
udpServices, totalUdp, err := listServices[db.UdpService, mantraev1.Service, db.ListUdpServicesParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListUdpServices,
|
||||
s.app.Conn.GetQuery().CountUdpServices,
|
||||
buildProtoUdpService,
|
||||
db.ListUdpServicesParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
services = append(services, httpServices...)
|
||||
services = append(services, tcpServices...)
|
||||
services = append(services, udpServices...)
|
||||
totalCount = totalHttp + totalTcp + totalUdp
|
||||
} else {
|
||||
var err error
|
||||
switch *req.Msg.Type {
|
||||
case mantraev1.ServiceType_SERVICE_TYPE_HTTP:
|
||||
services, totalCount, err = listServices[db.HttpService, mantraev1.Service, db.ListHttpServicesParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpServices,
|
||||
s.app.Conn.GetQuery().CountHttpServices,
|
||||
buildProtoHttpService,
|
||||
db.ListHttpServicesParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if req.Msg.AgentId == nil {
|
||||
services, totalCount, err = listServices[db.HttpService, mantraev1.Service, db.ListHttpServicesParams, int64](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpServices,
|
||||
s.app.Conn.GetQuery().CountHttpServicesByProfile,
|
||||
buildProtoHttpService,
|
||||
db.ListHttpServicesParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
req.Msg.ProfileId,
|
||||
)
|
||||
} else {
|
||||
services, totalCount, err = listServices[db.HttpService, mantraev1.Service, db.ListHttpServicesByAgentParams, *string](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListHttpServicesByAgent,
|
||||
s.app.Conn.GetQuery().CountHttpServicesByAgent,
|
||||
buildProtoHttpService,
|
||||
db.ListHttpServicesByAgentParams{AgentID: req.Msg.AgentId, Limit: limit, Offset: offset},
|
||||
req.Msg.AgentId,
|
||||
)
|
||||
}
|
||||
|
||||
case mantraev1.ServiceType_SERVICE_TYPE_TCP:
|
||||
services, totalCount, err = listServices[db.TcpService, mantraev1.Service, db.ListTcpServicesParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpServices,
|
||||
s.app.Conn.GetQuery().CountTcpServices,
|
||||
buildProtoTcpService,
|
||||
db.ListTcpServicesParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if req.Msg.AgentId == nil {
|
||||
services, totalCount, err = listServices[db.TcpService, mantraev1.Service, db.ListTcpServicesParams, int64](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpServices,
|
||||
s.app.Conn.GetQuery().CountTcpServicesByProfile,
|
||||
buildProtoTcpService,
|
||||
db.ListTcpServicesParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
req.Msg.ProfileId,
|
||||
)
|
||||
} else {
|
||||
services, totalCount, err = listServices[db.TcpService, mantraev1.Service, db.ListTcpServicesByAgentParams, *string](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListTcpServicesByAgent,
|
||||
s.app.Conn.GetQuery().CountTcpServicesByAgent,
|
||||
buildProtoTcpService,
|
||||
db.ListTcpServicesByAgentParams{AgentID: req.Msg.AgentId, Limit: limit, Offset: offset},
|
||||
req.Msg.AgentId,
|
||||
)
|
||||
}
|
||||
|
||||
case mantraev1.ServiceType_SERVICE_TYPE_UDP:
|
||||
services, totalCount, err = listServices[db.UdpService, mantraev1.Service, db.ListUdpServicesParams](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListUdpServices,
|
||||
s.app.Conn.GetQuery().CountUdpServices,
|
||||
buildProtoUdpService,
|
||||
db.ListUdpServicesParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
)
|
||||
if req.Msg.AgentId == nil {
|
||||
services, totalCount, err = listServices[db.UdpService, mantraev1.Service, db.ListUdpServicesParams, int64](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListUdpServices,
|
||||
s.app.Conn.GetQuery().CountUdpServicesByProfile,
|
||||
buildProtoUdpService,
|
||||
db.ListUdpServicesParams{ProfileID: req.Msg.ProfileId, Limit: limit, Offset: offset},
|
||||
req.Msg.ProfileId,
|
||||
)
|
||||
} else {
|
||||
services, totalCount, err = listServices[db.UdpService, mantraev1.Service, db.ListUdpServicesByAgentParams, *string](
|
||||
ctx,
|
||||
s.app.Conn.GetQuery().ListUdpServicesByAgent,
|
||||
s.app.Conn.GetQuery().CountUdpServicesByAgent,
|
||||
buildProtoUdpService,
|
||||
db.ListUdpServicesByAgentParams{AgentID: req.Msg.AgentId, Limit: limit, Offset: offset},
|
||||
req.Msg.AgentId,
|
||||
)
|
||||
}
|
||||
|
||||
default:
|
||||
return nil, connect.NewError(connect.CodeInvalidArgument, nil)
|
||||
@@ -333,20 +377,22 @@ func (s *Service) ListServices(
|
||||
func listServices[
|
||||
DBType any,
|
||||
ProtoType any,
|
||||
ParamsType any,
|
||||
ListParams any,
|
||||
CountParams any,
|
||||
](
|
||||
ctx context.Context,
|
||||
listFn func(context.Context, ParamsType) ([]DBType, error),
|
||||
countFn func(context.Context) (int64, error),
|
||||
listFn func(context.Context, ListParams) ([]DBType, error),
|
||||
countFn func(context.Context, CountParams) (int64, error),
|
||||
buildFn func(DBType) (*mantraev1.Service, error),
|
||||
params ParamsType,
|
||||
listParams ListParams,
|
||||
countParams CountParams,
|
||||
) ([]*mantraev1.Service, int64, error) {
|
||||
dbServices, err := listFn(ctx, params)
|
||||
dbServices, err := listFn(ctx, listParams)
|
||||
if err != nil {
|
||||
return nil, 0, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
totalCount, err := countFn(ctx)
|
||||
totalCount, err := countFn(ctx, countParams)
|
||||
if err != nil {
|
||||
return nil, 0, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
@@ -364,6 +410,100 @@ func listServices[
|
||||
return services, totalCount, nil
|
||||
}
|
||||
|
||||
func buildServicesByProfile(r db.ListServicesByProfileRow) (*mantraev1.Service, error) {
|
||||
config, err := MarshalStruct(r.Config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to marshal service config: %w", err)
|
||||
}
|
||||
var service mantraev1.Service
|
||||
switch r.Type {
|
||||
case "http":
|
||||
service = mantraev1.Service{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.ServiceType_SERVICE_TYPE_HTTP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "tcp":
|
||||
service = mantraev1.Service{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.ServiceType_SERVICE_TYPE_TCP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "udp":
|
||||
service = mantraev1.Service{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.ServiceType_SERVICE_TYPE_UDP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid service type: %s", r.Type)
|
||||
}
|
||||
|
||||
return &service, nil
|
||||
}
|
||||
|
||||
func buildServicesByAgent(r db.ListServicesByAgentRow) (*mantraev1.Service, error) {
|
||||
config, err := MarshalStruct(r.Config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to marshal service config: %w", err)
|
||||
}
|
||||
var service mantraev1.Service
|
||||
switch r.Type {
|
||||
case "http":
|
||||
service = mantraev1.Service{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.ServiceType_SERVICE_TYPE_HTTP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "tcp":
|
||||
service = mantraev1.Service{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.ServiceType_SERVICE_TYPE_TCP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
case "udp":
|
||||
service = mantraev1.Service{
|
||||
Id: r.ID,
|
||||
ProfileId: r.ProfileID,
|
||||
AgentId: SafeString(r.AgentID),
|
||||
Name: r.Name,
|
||||
Config: config,
|
||||
Type: mantraev1.ServiceType_SERVICE_TYPE_UDP,
|
||||
CreatedAt: SafeTimestamp(r.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(r.UpdatedAt),
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid service type: %s", r.Type)
|
||||
}
|
||||
|
||||
return &service, nil
|
||||
}
|
||||
|
||||
func buildProtoHttpService(r db.HttpService) (*mantraev1.Service, error) {
|
||||
config, err := MarshalStruct(r.Config)
|
||||
if err != nil {
|
||||
|
||||
@@ -36,33 +36,99 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
|
||||
if q.countHttpMiddlewaresStmt, err = db.PrepareContext(ctx, countHttpMiddlewares); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountHttpMiddlewares: %w", err)
|
||||
}
|
||||
if q.countHttpMiddlewaresByAgentStmt, err = db.PrepareContext(ctx, countHttpMiddlewaresByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountHttpMiddlewaresByAgent: %w", err)
|
||||
}
|
||||
if q.countHttpMiddlewaresByProfileStmt, err = db.PrepareContext(ctx, countHttpMiddlewaresByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountHttpMiddlewaresByProfile: %w", err)
|
||||
}
|
||||
if q.countHttpRoutersStmt, err = db.PrepareContext(ctx, countHttpRouters); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountHttpRouters: %w", err)
|
||||
}
|
||||
if q.countHttpRoutersByAgentStmt, err = db.PrepareContext(ctx, countHttpRoutersByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountHttpRoutersByAgent: %w", err)
|
||||
}
|
||||
if q.countHttpRoutersByProfileStmt, err = db.PrepareContext(ctx, countHttpRoutersByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountHttpRoutersByProfile: %w", err)
|
||||
}
|
||||
if q.countHttpServicesStmt, err = db.PrepareContext(ctx, countHttpServices); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountHttpServices: %w", err)
|
||||
}
|
||||
if q.countHttpServicesByAgentStmt, err = db.PrepareContext(ctx, countHttpServicesByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountHttpServicesByAgent: %w", err)
|
||||
}
|
||||
if q.countHttpServicesByProfileStmt, err = db.PrepareContext(ctx, countHttpServicesByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountHttpServicesByProfile: %w", err)
|
||||
}
|
||||
if q.countMiddlewaresByAgentStmt, err = db.PrepareContext(ctx, countMiddlewaresByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountMiddlewaresByAgent: %w", err)
|
||||
}
|
||||
if q.countMiddlewaresByProfileStmt, err = db.PrepareContext(ctx, countMiddlewaresByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountMiddlewaresByProfile: %w", err)
|
||||
}
|
||||
if q.countProfilesStmt, err = db.PrepareContext(ctx, countProfiles); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountProfiles: %w", err)
|
||||
}
|
||||
if q.countRoutersByAgentStmt, err = db.PrepareContext(ctx, countRoutersByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountRoutersByAgent: %w", err)
|
||||
}
|
||||
if q.countRoutersByProfileStmt, err = db.PrepareContext(ctx, countRoutersByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountRoutersByProfile: %w", err)
|
||||
}
|
||||
if q.countServicesByAgentStmt, err = db.PrepareContext(ctx, countServicesByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountServicesByAgent: %w", err)
|
||||
}
|
||||
if q.countServicesByProfileStmt, err = db.PrepareContext(ctx, countServicesByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountServicesByProfile: %w", err)
|
||||
}
|
||||
if q.countTcpMiddlewaresStmt, err = db.PrepareContext(ctx, countTcpMiddlewares); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTcpMiddlewares: %w", err)
|
||||
}
|
||||
if q.countTcpMiddlewaresByAgentStmt, err = db.PrepareContext(ctx, countTcpMiddlewaresByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTcpMiddlewaresByAgent: %w", err)
|
||||
}
|
||||
if q.countTcpMiddlewaresByProfileStmt, err = db.PrepareContext(ctx, countTcpMiddlewaresByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTcpMiddlewaresByProfile: %w", err)
|
||||
}
|
||||
if q.countTcpRoutersStmt, err = db.PrepareContext(ctx, countTcpRouters); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTcpRouters: %w", err)
|
||||
}
|
||||
if q.countTcpRoutersByAgentStmt, err = db.PrepareContext(ctx, countTcpRoutersByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTcpRoutersByAgent: %w", err)
|
||||
}
|
||||
if q.countTcpRoutersByProfileStmt, err = db.PrepareContext(ctx, countTcpRoutersByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTcpRoutersByProfile: %w", err)
|
||||
}
|
||||
if q.countTcpServicesStmt, err = db.PrepareContext(ctx, countTcpServices); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTcpServices: %w", err)
|
||||
}
|
||||
if q.countTcpServicesByAgentStmt, err = db.PrepareContext(ctx, countTcpServicesByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTcpServicesByAgent: %w", err)
|
||||
}
|
||||
if q.countTcpServicesByProfileStmt, err = db.PrepareContext(ctx, countTcpServicesByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTcpServicesByProfile: %w", err)
|
||||
}
|
||||
if q.countTraefikInstancesStmt, err = db.PrepareContext(ctx, countTraefikInstances); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountTraefikInstances: %w", err)
|
||||
}
|
||||
if q.countUdpRoutersStmt, err = db.PrepareContext(ctx, countUdpRouters); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountUdpRouters: %w", err)
|
||||
}
|
||||
if q.countUdpRoutersByAgentStmt, err = db.PrepareContext(ctx, countUdpRoutersByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountUdpRoutersByAgent: %w", err)
|
||||
}
|
||||
if q.countUdpRoutersByProfileStmt, err = db.PrepareContext(ctx, countUdpRoutersByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountUdpRoutersByProfile: %w", err)
|
||||
}
|
||||
if q.countUdpServicesStmt, err = db.PrepareContext(ctx, countUdpServices); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountUdpServices: %w", err)
|
||||
}
|
||||
if q.countUdpServicesByAgentStmt, err = db.PrepareContext(ctx, countUdpServicesByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountUdpServicesByAgent: %w", err)
|
||||
}
|
||||
if q.countUdpServicesByProfileStmt, err = db.PrepareContext(ctx, countUdpServicesByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountUdpServicesByProfile: %w", err)
|
||||
}
|
||||
if q.countUsersStmt, err = db.PrepareContext(ctx, countUsers); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountUsers: %w", err)
|
||||
}
|
||||
@@ -273,42 +339,84 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
|
||||
if q.listHttpMiddlewaresStmt, err = db.PrepareContext(ctx, listHttpMiddlewares); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListHttpMiddlewares: %w", err)
|
||||
}
|
||||
if q.listHttpMiddlewaresByAgentStmt, err = db.PrepareContext(ctx, listHttpMiddlewaresByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListHttpMiddlewaresByAgent: %w", err)
|
||||
}
|
||||
if q.listHttpRouterDNSProvidersStmt, err = db.PrepareContext(ctx, listHttpRouterDNSProviders); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListHttpRouterDNSProviders: %w", err)
|
||||
}
|
||||
if q.listHttpRoutersStmt, err = db.PrepareContext(ctx, listHttpRouters); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListHttpRouters: %w", err)
|
||||
}
|
||||
if q.listHttpRoutersByAgentStmt, err = db.PrepareContext(ctx, listHttpRoutersByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListHttpRoutersByAgent: %w", err)
|
||||
}
|
||||
if q.listHttpServicesStmt, err = db.PrepareContext(ctx, listHttpServices); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListHttpServices: %w", err)
|
||||
}
|
||||
if q.listHttpServicesByAgentStmt, err = db.PrepareContext(ctx, listHttpServicesByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListHttpServicesByAgent: %w", err)
|
||||
}
|
||||
if q.listMiddlewaresByAgentStmt, err = db.PrepareContext(ctx, listMiddlewaresByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListMiddlewaresByAgent: %w", err)
|
||||
}
|
||||
if q.listMiddlewaresByProfileStmt, err = db.PrepareContext(ctx, listMiddlewaresByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListMiddlewaresByProfile: %w", err)
|
||||
}
|
||||
if q.listProfilesStmt, err = db.PrepareContext(ctx, listProfiles); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListProfiles: %w", err)
|
||||
}
|
||||
if q.listRoutersByAgentStmt, err = db.PrepareContext(ctx, listRoutersByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListRoutersByAgent: %w", err)
|
||||
}
|
||||
if q.listRoutersByProfileStmt, err = db.PrepareContext(ctx, listRoutersByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListRoutersByProfile: %w", err)
|
||||
}
|
||||
if q.listServicesByAgentStmt, err = db.PrepareContext(ctx, listServicesByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListServicesByAgent: %w", err)
|
||||
}
|
||||
if q.listServicesByProfileStmt, err = db.PrepareContext(ctx, listServicesByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListServicesByProfile: %w", err)
|
||||
}
|
||||
if q.listSettingsStmt, err = db.PrepareContext(ctx, listSettings); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListSettings: %w", err)
|
||||
}
|
||||
if q.listTcpMiddlewaresStmt, err = db.PrepareContext(ctx, listTcpMiddlewares); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListTcpMiddlewares: %w", err)
|
||||
}
|
||||
if q.listTcpMiddlewaresByAgentStmt, err = db.PrepareContext(ctx, listTcpMiddlewaresByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListTcpMiddlewaresByAgent: %w", err)
|
||||
}
|
||||
if q.listTcpRouterDNSProvidersStmt, err = db.PrepareContext(ctx, listTcpRouterDNSProviders); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListTcpRouterDNSProviders: %w", err)
|
||||
}
|
||||
if q.listTcpRoutersStmt, err = db.PrepareContext(ctx, listTcpRouters); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListTcpRouters: %w", err)
|
||||
}
|
||||
if q.listTcpRoutersByAgentStmt, err = db.PrepareContext(ctx, listTcpRoutersByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListTcpRoutersByAgent: %w", err)
|
||||
}
|
||||
if q.listTcpServicesStmt, err = db.PrepareContext(ctx, listTcpServices); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListTcpServices: %w", err)
|
||||
}
|
||||
if q.listTcpServicesByAgentStmt, err = db.PrepareContext(ctx, listTcpServicesByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListTcpServicesByAgent: %w", err)
|
||||
}
|
||||
if q.listTraefikInstancesStmt, err = db.PrepareContext(ctx, listTraefikInstances); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListTraefikInstances: %w", err)
|
||||
}
|
||||
if q.listUdpRoutersStmt, err = db.PrepareContext(ctx, listUdpRouters); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListUdpRouters: %w", err)
|
||||
}
|
||||
if q.listUdpRoutersByAgentStmt, err = db.PrepareContext(ctx, listUdpRoutersByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListUdpRoutersByAgent: %w", err)
|
||||
}
|
||||
if q.listUdpServicesStmt, err = db.PrepareContext(ctx, listUdpServices); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListUdpServices: %w", err)
|
||||
}
|
||||
if q.listUdpServicesByAgentStmt, err = db.PrepareContext(ctx, listUdpServicesByAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListUdpServicesByAgent: %w", err)
|
||||
}
|
||||
if q.listUsersStmt, err = db.PrepareContext(ctx, listUsers); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListUsers: %w", err)
|
||||
}
|
||||
@@ -400,36 +508,126 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing countHttpMiddlewaresStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countHttpMiddlewaresByAgentStmt != nil {
|
||||
if cerr := q.countHttpMiddlewaresByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countHttpMiddlewaresByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countHttpMiddlewaresByProfileStmt != nil {
|
||||
if cerr := q.countHttpMiddlewaresByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countHttpMiddlewaresByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countHttpRoutersStmt != nil {
|
||||
if cerr := q.countHttpRoutersStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countHttpRoutersStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countHttpRoutersByAgentStmt != nil {
|
||||
if cerr := q.countHttpRoutersByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countHttpRoutersByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countHttpRoutersByProfileStmt != nil {
|
||||
if cerr := q.countHttpRoutersByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countHttpRoutersByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countHttpServicesStmt != nil {
|
||||
if cerr := q.countHttpServicesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countHttpServicesStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countHttpServicesByAgentStmt != nil {
|
||||
if cerr := q.countHttpServicesByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countHttpServicesByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countHttpServicesByProfileStmt != nil {
|
||||
if cerr := q.countHttpServicesByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countHttpServicesByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countMiddlewaresByAgentStmt != nil {
|
||||
if cerr := q.countMiddlewaresByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countMiddlewaresByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countMiddlewaresByProfileStmt != nil {
|
||||
if cerr := q.countMiddlewaresByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countMiddlewaresByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countProfilesStmt != nil {
|
||||
if cerr := q.countProfilesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countProfilesStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countRoutersByAgentStmt != nil {
|
||||
if cerr := q.countRoutersByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countRoutersByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countRoutersByProfileStmt != nil {
|
||||
if cerr := q.countRoutersByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countRoutersByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countServicesByAgentStmt != nil {
|
||||
if cerr := q.countServicesByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countServicesByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countServicesByProfileStmt != nil {
|
||||
if cerr := q.countServicesByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countServicesByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTcpMiddlewaresStmt != nil {
|
||||
if cerr := q.countTcpMiddlewaresStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTcpMiddlewaresStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTcpMiddlewaresByAgentStmt != nil {
|
||||
if cerr := q.countTcpMiddlewaresByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTcpMiddlewaresByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTcpMiddlewaresByProfileStmt != nil {
|
||||
if cerr := q.countTcpMiddlewaresByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTcpMiddlewaresByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTcpRoutersStmt != nil {
|
||||
if cerr := q.countTcpRoutersStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTcpRoutersStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTcpRoutersByAgentStmt != nil {
|
||||
if cerr := q.countTcpRoutersByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTcpRoutersByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTcpRoutersByProfileStmt != nil {
|
||||
if cerr := q.countTcpRoutersByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTcpRoutersByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTcpServicesStmt != nil {
|
||||
if cerr := q.countTcpServicesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTcpServicesStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTcpServicesByAgentStmt != nil {
|
||||
if cerr := q.countTcpServicesByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTcpServicesByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTcpServicesByProfileStmt != nil {
|
||||
if cerr := q.countTcpServicesByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTcpServicesByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countTraefikInstancesStmt != nil {
|
||||
if cerr := q.countTraefikInstancesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countTraefikInstancesStmt: %w", cerr)
|
||||
@@ -440,11 +638,31 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing countUdpRoutersStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countUdpRoutersByAgentStmt != nil {
|
||||
if cerr := q.countUdpRoutersByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countUdpRoutersByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countUdpRoutersByProfileStmt != nil {
|
||||
if cerr := q.countUdpRoutersByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countUdpRoutersByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countUdpServicesStmt != nil {
|
||||
if cerr := q.countUdpServicesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countUdpServicesStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countUdpServicesByAgentStmt != nil {
|
||||
if cerr := q.countUdpServicesByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countUdpServicesByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countUdpServicesByProfileStmt != nil {
|
||||
if cerr := q.countUdpServicesByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countUdpServicesByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countUsersStmt != nil {
|
||||
if cerr := q.countUsersStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countUsersStmt: %w", cerr)
|
||||
@@ -795,6 +1013,11 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing listHttpMiddlewaresStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listHttpMiddlewaresByAgentStmt != nil {
|
||||
if cerr := q.listHttpMiddlewaresByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listHttpMiddlewaresByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listHttpRouterDNSProvidersStmt != nil {
|
||||
if cerr := q.listHttpRouterDNSProvidersStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listHttpRouterDNSProvidersStmt: %w", cerr)
|
||||
@@ -805,16 +1028,56 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing listHttpRoutersStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listHttpRoutersByAgentStmt != nil {
|
||||
if cerr := q.listHttpRoutersByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listHttpRoutersByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listHttpServicesStmt != nil {
|
||||
if cerr := q.listHttpServicesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listHttpServicesStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listHttpServicesByAgentStmt != nil {
|
||||
if cerr := q.listHttpServicesByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listHttpServicesByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listMiddlewaresByAgentStmt != nil {
|
||||
if cerr := q.listMiddlewaresByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listMiddlewaresByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listMiddlewaresByProfileStmt != nil {
|
||||
if cerr := q.listMiddlewaresByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listMiddlewaresByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listProfilesStmt != nil {
|
||||
if cerr := q.listProfilesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listProfilesStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listRoutersByAgentStmt != nil {
|
||||
if cerr := q.listRoutersByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listRoutersByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listRoutersByProfileStmt != nil {
|
||||
if cerr := q.listRoutersByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listRoutersByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listServicesByAgentStmt != nil {
|
||||
if cerr := q.listServicesByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listServicesByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listServicesByProfileStmt != nil {
|
||||
if cerr := q.listServicesByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listServicesByProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listSettingsStmt != nil {
|
||||
if cerr := q.listSettingsStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listSettingsStmt: %w", cerr)
|
||||
@@ -825,6 +1088,11 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing listTcpMiddlewaresStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listTcpMiddlewaresByAgentStmt != nil {
|
||||
if cerr := q.listTcpMiddlewaresByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listTcpMiddlewaresByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listTcpRouterDNSProvidersStmt != nil {
|
||||
if cerr := q.listTcpRouterDNSProvidersStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listTcpRouterDNSProvidersStmt: %w", cerr)
|
||||
@@ -835,11 +1103,21 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing listTcpRoutersStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listTcpRoutersByAgentStmt != nil {
|
||||
if cerr := q.listTcpRoutersByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listTcpRoutersByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listTcpServicesStmt != nil {
|
||||
if cerr := q.listTcpServicesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listTcpServicesStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listTcpServicesByAgentStmt != nil {
|
||||
if cerr := q.listTcpServicesByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listTcpServicesByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listTraefikInstancesStmt != nil {
|
||||
if cerr := q.listTraefikInstancesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listTraefikInstancesStmt: %w", cerr)
|
||||
@@ -850,11 +1128,21 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing listUdpRoutersStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listUdpRoutersByAgentStmt != nil {
|
||||
if cerr := q.listUdpRoutersByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listUdpRoutersByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listUdpServicesStmt != nil {
|
||||
if cerr := q.listUdpServicesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listUdpServicesStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listUdpServicesByAgentStmt != nil {
|
||||
if cerr := q.listUdpServicesByAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listUdpServicesByAgentStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listUsersStmt != nil {
|
||||
if cerr := q.listUsersStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listUsersStmt: %w", cerr)
|
||||
@@ -1008,15 +1296,37 @@ type Queries struct {
|
||||
countDnsProvidersStmt *sql.Stmt
|
||||
countEntryPointsStmt *sql.Stmt
|
||||
countHttpMiddlewaresStmt *sql.Stmt
|
||||
countHttpMiddlewaresByAgentStmt *sql.Stmt
|
||||
countHttpMiddlewaresByProfileStmt *sql.Stmt
|
||||
countHttpRoutersStmt *sql.Stmt
|
||||
countHttpRoutersByAgentStmt *sql.Stmt
|
||||
countHttpRoutersByProfileStmt *sql.Stmt
|
||||
countHttpServicesStmt *sql.Stmt
|
||||
countHttpServicesByAgentStmt *sql.Stmt
|
||||
countHttpServicesByProfileStmt *sql.Stmt
|
||||
countMiddlewaresByAgentStmt *sql.Stmt
|
||||
countMiddlewaresByProfileStmt *sql.Stmt
|
||||
countProfilesStmt *sql.Stmt
|
||||
countRoutersByAgentStmt *sql.Stmt
|
||||
countRoutersByProfileStmt *sql.Stmt
|
||||
countServicesByAgentStmt *sql.Stmt
|
||||
countServicesByProfileStmt *sql.Stmt
|
||||
countTcpMiddlewaresStmt *sql.Stmt
|
||||
countTcpMiddlewaresByAgentStmt *sql.Stmt
|
||||
countTcpMiddlewaresByProfileStmt *sql.Stmt
|
||||
countTcpRoutersStmt *sql.Stmt
|
||||
countTcpRoutersByAgentStmt *sql.Stmt
|
||||
countTcpRoutersByProfileStmt *sql.Stmt
|
||||
countTcpServicesStmt *sql.Stmt
|
||||
countTcpServicesByAgentStmt *sql.Stmt
|
||||
countTcpServicesByProfileStmt *sql.Stmt
|
||||
countTraefikInstancesStmt *sql.Stmt
|
||||
countUdpRoutersStmt *sql.Stmt
|
||||
countUdpRoutersByAgentStmt *sql.Stmt
|
||||
countUdpRoutersByProfileStmt *sql.Stmt
|
||||
countUdpServicesStmt *sql.Stmt
|
||||
countUdpServicesByAgentStmt *sql.Stmt
|
||||
countUdpServicesByProfileStmt *sql.Stmt
|
||||
countUsersStmt *sql.Stmt
|
||||
createAgentStmt *sql.Stmt
|
||||
createDnsProviderStmt *sql.Stmt
|
||||
@@ -1087,18 +1397,32 @@ type Queries struct {
|
||||
listEntryPointsStmt *sql.Stmt
|
||||
listErrorsStmt *sql.Stmt
|
||||
listHttpMiddlewaresStmt *sql.Stmt
|
||||
listHttpMiddlewaresByAgentStmt *sql.Stmt
|
||||
listHttpRouterDNSProvidersStmt *sql.Stmt
|
||||
listHttpRoutersStmt *sql.Stmt
|
||||
listHttpRoutersByAgentStmt *sql.Stmt
|
||||
listHttpServicesStmt *sql.Stmt
|
||||
listHttpServicesByAgentStmt *sql.Stmt
|
||||
listMiddlewaresByAgentStmt *sql.Stmt
|
||||
listMiddlewaresByProfileStmt *sql.Stmt
|
||||
listProfilesStmt *sql.Stmt
|
||||
listRoutersByAgentStmt *sql.Stmt
|
||||
listRoutersByProfileStmt *sql.Stmt
|
||||
listServicesByAgentStmt *sql.Stmt
|
||||
listServicesByProfileStmt *sql.Stmt
|
||||
listSettingsStmt *sql.Stmt
|
||||
listTcpMiddlewaresStmt *sql.Stmt
|
||||
listTcpMiddlewaresByAgentStmt *sql.Stmt
|
||||
listTcpRouterDNSProvidersStmt *sql.Stmt
|
||||
listTcpRoutersStmt *sql.Stmt
|
||||
listTcpRoutersByAgentStmt *sql.Stmt
|
||||
listTcpServicesStmt *sql.Stmt
|
||||
listTcpServicesByAgentStmt *sql.Stmt
|
||||
listTraefikInstancesStmt *sql.Stmt
|
||||
listUdpRoutersStmt *sql.Stmt
|
||||
listUdpRoutersByAgentStmt *sql.Stmt
|
||||
listUdpServicesStmt *sql.Stmt
|
||||
listUdpServicesByAgentStmt *sql.Stmt
|
||||
listUsersStmt *sql.Stmt
|
||||
logErrorStmt *sql.Stmt
|
||||
updateAgentStmt *sql.Stmt
|
||||
@@ -1131,15 +1455,37 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries {
|
||||
countDnsProvidersStmt: q.countDnsProvidersStmt,
|
||||
countEntryPointsStmt: q.countEntryPointsStmt,
|
||||
countHttpMiddlewaresStmt: q.countHttpMiddlewaresStmt,
|
||||
countHttpMiddlewaresByAgentStmt: q.countHttpMiddlewaresByAgentStmt,
|
||||
countHttpMiddlewaresByProfileStmt: q.countHttpMiddlewaresByProfileStmt,
|
||||
countHttpRoutersStmt: q.countHttpRoutersStmt,
|
||||
countHttpRoutersByAgentStmt: q.countHttpRoutersByAgentStmt,
|
||||
countHttpRoutersByProfileStmt: q.countHttpRoutersByProfileStmt,
|
||||
countHttpServicesStmt: q.countHttpServicesStmt,
|
||||
countHttpServicesByAgentStmt: q.countHttpServicesByAgentStmt,
|
||||
countHttpServicesByProfileStmt: q.countHttpServicesByProfileStmt,
|
||||
countMiddlewaresByAgentStmt: q.countMiddlewaresByAgentStmt,
|
||||
countMiddlewaresByProfileStmt: q.countMiddlewaresByProfileStmt,
|
||||
countProfilesStmt: q.countProfilesStmt,
|
||||
countRoutersByAgentStmt: q.countRoutersByAgentStmt,
|
||||
countRoutersByProfileStmt: q.countRoutersByProfileStmt,
|
||||
countServicesByAgentStmt: q.countServicesByAgentStmt,
|
||||
countServicesByProfileStmt: q.countServicesByProfileStmt,
|
||||
countTcpMiddlewaresStmt: q.countTcpMiddlewaresStmt,
|
||||
countTcpMiddlewaresByAgentStmt: q.countTcpMiddlewaresByAgentStmt,
|
||||
countTcpMiddlewaresByProfileStmt: q.countTcpMiddlewaresByProfileStmt,
|
||||
countTcpRoutersStmt: q.countTcpRoutersStmt,
|
||||
countTcpRoutersByAgentStmt: q.countTcpRoutersByAgentStmt,
|
||||
countTcpRoutersByProfileStmt: q.countTcpRoutersByProfileStmt,
|
||||
countTcpServicesStmt: q.countTcpServicesStmt,
|
||||
countTcpServicesByAgentStmt: q.countTcpServicesByAgentStmt,
|
||||
countTcpServicesByProfileStmt: q.countTcpServicesByProfileStmt,
|
||||
countTraefikInstancesStmt: q.countTraefikInstancesStmt,
|
||||
countUdpRoutersStmt: q.countUdpRoutersStmt,
|
||||
countUdpRoutersByAgentStmt: q.countUdpRoutersByAgentStmt,
|
||||
countUdpRoutersByProfileStmt: q.countUdpRoutersByProfileStmt,
|
||||
countUdpServicesStmt: q.countUdpServicesStmt,
|
||||
countUdpServicesByAgentStmt: q.countUdpServicesByAgentStmt,
|
||||
countUdpServicesByProfileStmt: q.countUdpServicesByProfileStmt,
|
||||
countUsersStmt: q.countUsersStmt,
|
||||
createAgentStmt: q.createAgentStmt,
|
||||
createDnsProviderStmt: q.createDnsProviderStmt,
|
||||
@@ -1210,18 +1556,32 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries {
|
||||
listEntryPointsStmt: q.listEntryPointsStmt,
|
||||
listErrorsStmt: q.listErrorsStmt,
|
||||
listHttpMiddlewaresStmt: q.listHttpMiddlewaresStmt,
|
||||
listHttpMiddlewaresByAgentStmt: q.listHttpMiddlewaresByAgentStmt,
|
||||
listHttpRouterDNSProvidersStmt: q.listHttpRouterDNSProvidersStmt,
|
||||
listHttpRoutersStmt: q.listHttpRoutersStmt,
|
||||
listHttpRoutersByAgentStmt: q.listHttpRoutersByAgentStmt,
|
||||
listHttpServicesStmt: q.listHttpServicesStmt,
|
||||
listHttpServicesByAgentStmt: q.listHttpServicesByAgentStmt,
|
||||
listMiddlewaresByAgentStmt: q.listMiddlewaresByAgentStmt,
|
||||
listMiddlewaresByProfileStmt: q.listMiddlewaresByProfileStmt,
|
||||
listProfilesStmt: q.listProfilesStmt,
|
||||
listRoutersByAgentStmt: q.listRoutersByAgentStmt,
|
||||
listRoutersByProfileStmt: q.listRoutersByProfileStmt,
|
||||
listServicesByAgentStmt: q.listServicesByAgentStmt,
|
||||
listServicesByProfileStmt: q.listServicesByProfileStmt,
|
||||
listSettingsStmt: q.listSettingsStmt,
|
||||
listTcpMiddlewaresStmt: q.listTcpMiddlewaresStmt,
|
||||
listTcpMiddlewaresByAgentStmt: q.listTcpMiddlewaresByAgentStmt,
|
||||
listTcpRouterDNSProvidersStmt: q.listTcpRouterDNSProvidersStmt,
|
||||
listTcpRoutersStmt: q.listTcpRoutersStmt,
|
||||
listTcpRoutersByAgentStmt: q.listTcpRoutersByAgentStmt,
|
||||
listTcpServicesStmt: q.listTcpServicesStmt,
|
||||
listTcpServicesByAgentStmt: q.listTcpServicesByAgentStmt,
|
||||
listTraefikInstancesStmt: q.listTraefikInstancesStmt,
|
||||
listUdpRoutersStmt: q.listUdpRoutersStmt,
|
||||
listUdpRoutersByAgentStmt: q.listUdpRoutersByAgentStmt,
|
||||
listUdpServicesStmt: q.listUdpServicesStmt,
|
||||
listUdpServicesByAgentStmt: q.listUdpServicesByAgentStmt,
|
||||
listUsersStmt: q.listUsersStmt,
|
||||
logErrorStmt: q.logErrorStmt,
|
||||
updateAgentStmt: q.updateAgentStmt,
|
||||
|
||||
@@ -25,6 +25,38 @@ func (q *Queries) CountHttpMiddlewares(ctx context.Context) (int64, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countHttpMiddlewaresByAgent = `-- name: CountHttpMiddlewaresByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
agent_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountHttpMiddlewaresByAgent(ctx context.Context, agentID *string) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countHttpMiddlewaresByAgentStmt, countHttpMiddlewaresByAgent, agentID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countHttpMiddlewaresByProfile = `-- name: CountHttpMiddlewaresByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
profile_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountHttpMiddlewaresByProfile(ctx context.Context, profileID int64) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countHttpMiddlewaresByProfileStmt, countHttpMiddlewaresByProfile, profileID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createHttpMiddleware = `-- name: CreateHttpMiddleware :one
|
||||
INSERT INTO
|
||||
http_middlewares (
|
||||
@@ -167,6 +199,59 @@ func (q *Queries) ListHttpMiddlewares(ctx context.Context, arg ListHttpMiddlewar
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listHttpMiddlewaresByAgent = `-- name: ListHttpMiddlewaresByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListHttpMiddlewaresByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListHttpMiddlewaresByAgent(ctx context.Context, arg ListHttpMiddlewaresByAgentParams) ([]HttpMiddleware, error) {
|
||||
rows, err := q.query(ctx, q.listHttpMiddlewaresByAgentStmt, listHttpMiddlewaresByAgent, arg.AgentID, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []HttpMiddleware
|
||||
for rows.Next() {
|
||||
var i HttpMiddleware
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.Enabled,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateHttpMiddleware = `-- name: UpdateHttpMiddleware :one
|
||||
UPDATE http_middlewares
|
||||
SET
|
||||
|
||||
@@ -25,6 +25,38 @@ func (q *Queries) CountHttpRouters(ctx context.Context) (int64, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countHttpRoutersByAgent = `-- name: CountHttpRoutersByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
agent_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountHttpRoutersByAgent(ctx context.Context, agentID *string) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countHttpRoutersByAgentStmt, countHttpRoutersByAgent, agentID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countHttpRoutersByProfile = `-- name: CountHttpRoutersByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
profile_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountHttpRoutersByProfile(ctx context.Context, profileID int64) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countHttpRoutersByProfileStmt, countHttpRoutersByProfile, profileID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createHttpRouter = `-- name: CreateHttpRouter :one
|
||||
INSERT INTO
|
||||
http_routers (
|
||||
@@ -156,6 +188,59 @@ func (q *Queries) ListHttpRouters(ctx context.Context, arg ListHttpRoutersParams
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listHttpRoutersByAgent = `-- name: ListHttpRoutersByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListHttpRoutersByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListHttpRoutersByAgent(ctx context.Context, arg ListHttpRoutersByAgentParams) ([]HttpRouter, error) {
|
||||
rows, err := q.query(ctx, q.listHttpRoutersByAgentStmt, listHttpRoutersByAgent, arg.AgentID, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []HttpRouter
|
||||
for rows.Next() {
|
||||
var i HttpRouter
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.Enabled,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateHttpRouter = `-- name: UpdateHttpRouter :one
|
||||
UPDATE http_routers
|
||||
SET
|
||||
|
||||
@@ -25,6 +25,38 @@ func (q *Queries) CountHttpServices(ctx context.Context) (int64, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countHttpServicesByAgent = `-- name: CountHttpServicesByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
agent_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountHttpServicesByAgent(ctx context.Context, agentID *string) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countHttpServicesByAgentStmt, countHttpServicesByAgent, agentID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countHttpServicesByProfile = `-- name: CountHttpServicesByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
profile_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountHttpServicesByProfile(ctx context.Context, profileID int64) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countHttpServicesByProfileStmt, countHttpServicesByProfile, profileID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createHttpService = `-- name: CreateHttpService :one
|
||||
INSERT INTO
|
||||
http_services (
|
||||
@@ -177,6 +209,58 @@ func (q *Queries) ListHttpServices(ctx context.Context, arg ListHttpServicesPara
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listHttpServicesByAgent = `-- name: ListHttpServicesByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, created_at, updated_at
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListHttpServicesByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListHttpServicesByAgent(ctx context.Context, arg ListHttpServicesByAgentParams) ([]HttpService, error) {
|
||||
rows, err := q.query(ctx, q.listHttpServicesByAgentStmt, listHttpServicesByAgent, arg.AgentID, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []HttpService
|
||||
for rows.Next() {
|
||||
var i HttpService
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateHttpService = `-- name: UpdateHttpService :one
|
||||
UPDATE http_services
|
||||
SET
|
||||
|
||||
231
internal/store/db/middlewares.sql.go
Normal file
231
internal/store/db/middlewares.sql.go
Normal file
@@ -0,0 +1,231 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.28.0
|
||||
// source: middlewares.sql
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/mizuchilabs/mantrae/internal/store/schema"
|
||||
)
|
||||
|
||||
const countMiddlewaresByAgent = `-- name: CountMiddlewaresByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
http_middlewares.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
tcp_middlewares.agent_id = ?
|
||||
`
|
||||
|
||||
type CountMiddlewaresByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
AgentID_2 *string `json:"agentId2"`
|
||||
}
|
||||
|
||||
func (q *Queries) CountMiddlewaresByAgent(ctx context.Context, arg CountMiddlewaresByAgentParams) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countMiddlewaresByAgentStmt, countMiddlewaresByAgent, arg.AgentID, arg.AgentID_2)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countMiddlewaresByProfile = `-- name: CountMiddlewaresByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
http_middlewares.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
tcp_middlewares.profile_id = ?
|
||||
`
|
||||
|
||||
type CountMiddlewaresByProfileParams struct {
|
||||
ProfileID int64 `json:"profileId"`
|
||||
ProfileID_2 int64 `json:"profileId2"`
|
||||
}
|
||||
|
||||
func (q *Queries) CountMiddlewaresByProfile(ctx context.Context, arg CountMiddlewaresByProfileParams) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countMiddlewaresByProfileStmt, countMiddlewaresByProfile, arg.ProfileID, arg.ProfileID_2)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const listMiddlewaresByAgent = `-- name: ListMiddlewaresByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
http_middlewares.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
tcp_middlewares.agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListMiddlewaresByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
AgentID_2 *string `json:"agentId2"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
type ListMiddlewaresByAgentRow struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
AgentID *string `json:"agentId"`
|
||||
Name string `json:"name"`
|
||||
Config *schema.Middleware `json:"config"`
|
||||
Enabled bool `json:"enabled"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListMiddlewaresByAgent(ctx context.Context, arg ListMiddlewaresByAgentParams) ([]ListMiddlewaresByAgentRow, error) {
|
||||
rows, err := q.query(ctx, q.listMiddlewaresByAgentStmt, listMiddlewaresByAgent,
|
||||
arg.AgentID,
|
||||
arg.AgentID_2,
|
||||
arg.Limit,
|
||||
arg.Offset,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []ListMiddlewaresByAgentRow
|
||||
for rows.Next() {
|
||||
var i ListMiddlewaresByAgentRow
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.Enabled,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.Type,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listMiddlewaresByProfile = `-- name: ListMiddlewaresByProfile :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
http_middlewares.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
tcp_middlewares.profile_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListMiddlewaresByProfileParams struct {
|
||||
ProfileID int64 `json:"profileId"`
|
||||
ProfileID_2 int64 `json:"profileId2"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
type ListMiddlewaresByProfileRow struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
AgentID *string `json:"agentId"`
|
||||
Name string `json:"name"`
|
||||
Config *schema.Middleware `json:"config"`
|
||||
Enabled bool `json:"enabled"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListMiddlewaresByProfile(ctx context.Context, arg ListMiddlewaresByProfileParams) ([]ListMiddlewaresByProfileRow, error) {
|
||||
rows, err := q.query(ctx, q.listMiddlewaresByProfileStmt, listMiddlewaresByProfile,
|
||||
arg.ProfileID,
|
||||
arg.ProfileID_2,
|
||||
arg.Limit,
|
||||
arg.Offset,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []ListMiddlewaresByProfileRow
|
||||
for rows.Next() {
|
||||
var i ListMiddlewaresByProfileRow
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.Enabled,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.Type,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
@@ -13,15 +13,37 @@ type Querier interface {
|
||||
CountDnsProviders(ctx context.Context) (int64, error)
|
||||
CountEntryPoints(ctx context.Context) (int64, error)
|
||||
CountHttpMiddlewares(ctx context.Context) (int64, error)
|
||||
CountHttpMiddlewaresByAgent(ctx context.Context, agentID *string) (int64, error)
|
||||
CountHttpMiddlewaresByProfile(ctx context.Context, profileID int64) (int64, error)
|
||||
CountHttpRouters(ctx context.Context) (int64, error)
|
||||
CountHttpRoutersByAgent(ctx context.Context, agentID *string) (int64, error)
|
||||
CountHttpRoutersByProfile(ctx context.Context, profileID int64) (int64, error)
|
||||
CountHttpServices(ctx context.Context) (int64, error)
|
||||
CountHttpServicesByAgent(ctx context.Context, agentID *string) (int64, error)
|
||||
CountHttpServicesByProfile(ctx context.Context, profileID int64) (int64, error)
|
||||
CountMiddlewaresByAgent(ctx context.Context, arg CountMiddlewaresByAgentParams) (int64, error)
|
||||
CountMiddlewaresByProfile(ctx context.Context, arg CountMiddlewaresByProfileParams) (int64, error)
|
||||
CountProfiles(ctx context.Context) (int64, error)
|
||||
CountRoutersByAgent(ctx context.Context, arg CountRoutersByAgentParams) (int64, error)
|
||||
CountRoutersByProfile(ctx context.Context, arg CountRoutersByProfileParams) (int64, error)
|
||||
CountServicesByAgent(ctx context.Context, arg CountServicesByAgentParams) (int64, error)
|
||||
CountServicesByProfile(ctx context.Context, arg CountServicesByProfileParams) (int64, error)
|
||||
CountTcpMiddlewares(ctx context.Context) (int64, error)
|
||||
CountTcpMiddlewaresByAgent(ctx context.Context, agentID *string) (int64, error)
|
||||
CountTcpMiddlewaresByProfile(ctx context.Context, profileID int64) (int64, error)
|
||||
CountTcpRouters(ctx context.Context) (int64, error)
|
||||
CountTcpRoutersByAgent(ctx context.Context, agentID *string) (int64, error)
|
||||
CountTcpRoutersByProfile(ctx context.Context, profileID int64) (int64, error)
|
||||
CountTcpServices(ctx context.Context) (int64, error)
|
||||
CountTcpServicesByAgent(ctx context.Context, agentID *string) (int64, error)
|
||||
CountTcpServicesByProfile(ctx context.Context, profileID int64) (int64, error)
|
||||
CountTraefikInstances(ctx context.Context) (int64, error)
|
||||
CountUdpRouters(ctx context.Context) (int64, error)
|
||||
CountUdpRoutersByAgent(ctx context.Context, agentID *string) (int64, error)
|
||||
CountUdpRoutersByProfile(ctx context.Context, profileID int64) (int64, error)
|
||||
CountUdpServices(ctx context.Context) (int64, error)
|
||||
CountUdpServicesByAgent(ctx context.Context, agentID *string) (int64, error)
|
||||
CountUdpServicesByProfile(ctx context.Context, profileID int64) (int64, error)
|
||||
CountUsers(ctx context.Context) (int64, error)
|
||||
CreateAgent(ctx context.Context, arg CreateAgentParams) (Agent, error)
|
||||
CreateDnsProvider(ctx context.Context, arg CreateDnsProviderParams) (DnsProvider, error)
|
||||
@@ -92,18 +114,32 @@ type Querier interface {
|
||||
ListEntryPoints(ctx context.Context, arg ListEntryPointsParams) ([]EntryPoint, error)
|
||||
ListErrors(ctx context.Context) ([]Error, error)
|
||||
ListHttpMiddlewares(ctx context.Context, arg ListHttpMiddlewaresParams) ([]HttpMiddleware, error)
|
||||
ListHttpMiddlewaresByAgent(ctx context.Context, arg ListHttpMiddlewaresByAgentParams) ([]HttpMiddleware, error)
|
||||
ListHttpRouterDNSProviders(ctx context.Context, httpRouterID int64) ([]HttpRouterDnsProvider, error)
|
||||
ListHttpRouters(ctx context.Context, arg ListHttpRoutersParams) ([]HttpRouter, error)
|
||||
ListHttpRoutersByAgent(ctx context.Context, arg ListHttpRoutersByAgentParams) ([]HttpRouter, error)
|
||||
ListHttpServices(ctx context.Context, arg ListHttpServicesParams) ([]HttpService, error)
|
||||
ListHttpServicesByAgent(ctx context.Context, arg ListHttpServicesByAgentParams) ([]HttpService, error)
|
||||
ListMiddlewaresByAgent(ctx context.Context, arg ListMiddlewaresByAgentParams) ([]ListMiddlewaresByAgentRow, error)
|
||||
ListMiddlewaresByProfile(ctx context.Context, arg ListMiddlewaresByProfileParams) ([]ListMiddlewaresByProfileRow, error)
|
||||
ListProfiles(ctx context.Context, arg ListProfilesParams) ([]Profile, error)
|
||||
ListRoutersByAgent(ctx context.Context, arg ListRoutersByAgentParams) ([]ListRoutersByAgentRow, error)
|
||||
ListRoutersByProfile(ctx context.Context, arg ListRoutersByProfileParams) ([]ListRoutersByProfileRow, error)
|
||||
ListServicesByAgent(ctx context.Context, arg ListServicesByAgentParams) ([]ListServicesByAgentRow, error)
|
||||
ListServicesByProfile(ctx context.Context, arg ListServicesByProfileParams) ([]ListServicesByProfileRow, error)
|
||||
ListSettings(ctx context.Context) ([]Setting, error)
|
||||
ListTcpMiddlewares(ctx context.Context, arg ListTcpMiddlewaresParams) ([]TcpMiddleware, error)
|
||||
ListTcpMiddlewaresByAgent(ctx context.Context, arg ListTcpMiddlewaresByAgentParams) ([]TcpMiddleware, error)
|
||||
ListTcpRouterDNSProviders(ctx context.Context, tcpRouterID int64) ([]TcpRouterDnsProvider, error)
|
||||
ListTcpRouters(ctx context.Context, arg ListTcpRoutersParams) ([]TcpRouter, error)
|
||||
ListTcpRoutersByAgent(ctx context.Context, arg ListTcpRoutersByAgentParams) ([]TcpRouter, error)
|
||||
ListTcpServices(ctx context.Context, arg ListTcpServicesParams) ([]TcpService, error)
|
||||
ListTcpServicesByAgent(ctx context.Context, arg ListTcpServicesByAgentParams) ([]TcpService, error)
|
||||
ListTraefikInstances(ctx context.Context, arg ListTraefikInstancesParams) ([]TraefikInstance, error)
|
||||
ListUdpRouters(ctx context.Context, arg ListUdpRoutersParams) ([]UdpRouter, error)
|
||||
ListUdpRoutersByAgent(ctx context.Context, arg ListUdpRoutersByAgentParams) ([]UdpRouter, error)
|
||||
ListUdpServices(ctx context.Context, arg ListUdpServicesParams) ([]UdpService, error)
|
||||
ListUdpServicesByAgent(ctx context.Context, arg ListUdpServicesByAgentParams) ([]UdpService, error)
|
||||
ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
|
||||
LogError(ctx context.Context, arg LogErrorParams) error
|
||||
UpdateAgent(ctx context.Context, arg UpdateAgentParams) (Agent, error)
|
||||
|
||||
267
internal/store/db/routers.sql.go
Normal file
267
internal/store/db/routers.sql.go
Normal file
@@ -0,0 +1,267 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.28.0
|
||||
// source: routers.sql
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/mizuchilabs/mantrae/internal/store/schema"
|
||||
)
|
||||
|
||||
const countRoutersByAgent = `-- name: CountRoutersByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
http_routers.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
tcp_routers.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
udp_routers.agent_id = ?
|
||||
`
|
||||
|
||||
type CountRoutersByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
AgentID_2 *string `json:"agentId2"`
|
||||
AgentID_3 *string `json:"agentId3"`
|
||||
}
|
||||
|
||||
func (q *Queries) CountRoutersByAgent(ctx context.Context, arg CountRoutersByAgentParams) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countRoutersByAgentStmt, countRoutersByAgent, arg.AgentID, arg.AgentID_2, arg.AgentID_3)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countRoutersByProfile = `-- name: CountRoutersByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
http_routers.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
tcp_routers.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
udp_routers.profile_id = ?
|
||||
`
|
||||
|
||||
type CountRoutersByProfileParams struct {
|
||||
ProfileID int64 `json:"profileId"`
|
||||
ProfileID_2 int64 `json:"profileId2"`
|
||||
ProfileID_3 int64 `json:"profileId3"`
|
||||
}
|
||||
|
||||
func (q *Queries) CountRoutersByProfile(ctx context.Context, arg CountRoutersByProfileParams) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countRoutersByProfileStmt, countRoutersByProfile, arg.ProfileID, arg.ProfileID_2, arg.ProfileID_3)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const listRoutersByAgent = `-- name: ListRoutersByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
http_routers.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
tcp_routers.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'udp' AS type
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
udp_routers.agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListRoutersByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
AgentID_2 *string `json:"agentId2"`
|
||||
AgentID_3 *string `json:"agentId3"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
type ListRoutersByAgentRow struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
AgentID *string `json:"agentId"`
|
||||
Name string `json:"name"`
|
||||
Config *schema.Router `json:"config"`
|
||||
Enabled bool `json:"enabled"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListRoutersByAgent(ctx context.Context, arg ListRoutersByAgentParams) ([]ListRoutersByAgentRow, error) {
|
||||
rows, err := q.query(ctx, q.listRoutersByAgentStmt, listRoutersByAgent,
|
||||
arg.AgentID,
|
||||
arg.AgentID_2,
|
||||
arg.AgentID_3,
|
||||
arg.Limit,
|
||||
arg.Offset,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []ListRoutersByAgentRow
|
||||
for rows.Next() {
|
||||
var i ListRoutersByAgentRow
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.Enabled,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.Type,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listRoutersByProfile = `-- name: ListRoutersByProfile :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
http_routers.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
tcp_routers.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at,
|
||||
'udp' AS type
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
udp_routers.profile_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListRoutersByProfileParams struct {
|
||||
ProfileID int64 `json:"profileId"`
|
||||
ProfileID_2 int64 `json:"profileId2"`
|
||||
ProfileID_3 int64 `json:"profileId3"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
type ListRoutersByProfileRow struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
AgentID *string `json:"agentId"`
|
||||
Name string `json:"name"`
|
||||
Config *schema.Router `json:"config"`
|
||||
Enabled bool `json:"enabled"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListRoutersByProfile(ctx context.Context, arg ListRoutersByProfileParams) ([]ListRoutersByProfileRow, error) {
|
||||
rows, err := q.query(ctx, q.listRoutersByProfileStmt, listRoutersByProfile,
|
||||
arg.ProfileID,
|
||||
arg.ProfileID_2,
|
||||
arg.ProfileID_3,
|
||||
arg.Limit,
|
||||
arg.Offset,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []ListRoutersByProfileRow
|
||||
for rows.Next() {
|
||||
var i ListRoutersByProfileRow
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.Enabled,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.Type,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
263
internal/store/db/services.sql.go
Normal file
263
internal/store/db/services.sql.go
Normal file
@@ -0,0 +1,263 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.28.0
|
||||
// source: services.sql
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/mizuchilabs/mantrae/internal/store/schema"
|
||||
)
|
||||
|
||||
const countServicesByAgent = `-- name: CountServicesByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
http_services.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
tcp_services.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
udp_services.agent_id = ?
|
||||
`
|
||||
|
||||
type CountServicesByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
AgentID_2 *string `json:"agentId2"`
|
||||
AgentID_3 *string `json:"agentId3"`
|
||||
}
|
||||
|
||||
func (q *Queries) CountServicesByAgent(ctx context.Context, arg CountServicesByAgentParams) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countServicesByAgentStmt, countServicesByAgent, arg.AgentID, arg.AgentID_2, arg.AgentID_3)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countServicesByProfile = `-- name: CountServicesByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
http_services.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
tcp_services.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
udp_services.profile_id = ?
|
||||
`
|
||||
|
||||
type CountServicesByProfileParams struct {
|
||||
ProfileID int64 `json:"profileId"`
|
||||
ProfileID_2 int64 `json:"profileId2"`
|
||||
ProfileID_3 int64 `json:"profileId3"`
|
||||
}
|
||||
|
||||
func (q *Queries) CountServicesByProfile(ctx context.Context, arg CountServicesByProfileParams) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countServicesByProfileStmt, countServicesByProfile, arg.ProfileID, arg.ProfileID_2, arg.ProfileID_3)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const listServicesByAgent = `-- name: ListServicesByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, created_at, updated_at,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
http_services.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, created_at, updated_at,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
tcp_services.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, created_at, updated_at,
|
||||
'udp' AS type
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
udp_services.agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListServicesByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
AgentID_2 *string `json:"agentId2"`
|
||||
AgentID_3 *string `json:"agentId3"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
type ListServicesByAgentRow struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
AgentID *string `json:"agentId"`
|
||||
Name string `json:"name"`
|
||||
Config *schema.Service `json:"config"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListServicesByAgent(ctx context.Context, arg ListServicesByAgentParams) ([]ListServicesByAgentRow, error) {
|
||||
rows, err := q.query(ctx, q.listServicesByAgentStmt, listServicesByAgent,
|
||||
arg.AgentID,
|
||||
arg.AgentID_2,
|
||||
arg.AgentID_3,
|
||||
arg.Limit,
|
||||
arg.Offset,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []ListServicesByAgentRow
|
||||
for rows.Next() {
|
||||
var i ListServicesByAgentRow
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.Type,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listServicesByProfile = `-- name: ListServicesByProfile :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, created_at, updated_at,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
http_services.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, created_at, updated_at,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
tcp_services.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, created_at, updated_at,
|
||||
'udp' AS type
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
udp_services.profile_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListServicesByProfileParams struct {
|
||||
ProfileID int64 `json:"profileId"`
|
||||
ProfileID_2 int64 `json:"profileId2"`
|
||||
ProfileID_3 int64 `json:"profileId3"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
type ListServicesByProfileRow struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
AgentID *string `json:"agentId"`
|
||||
Name string `json:"name"`
|
||||
Config *schema.Service `json:"config"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListServicesByProfile(ctx context.Context, arg ListServicesByProfileParams) ([]ListServicesByProfileRow, error) {
|
||||
rows, err := q.query(ctx, q.listServicesByProfileStmt, listServicesByProfile,
|
||||
arg.ProfileID,
|
||||
arg.ProfileID_2,
|
||||
arg.ProfileID_3,
|
||||
arg.Limit,
|
||||
arg.Offset,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []ListServicesByProfileRow
|
||||
for rows.Next() {
|
||||
var i ListServicesByProfileRow
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.Type,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
@@ -25,6 +25,38 @@ func (q *Queries) CountTcpMiddlewares(ctx context.Context) (int64, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countTcpMiddlewaresByAgent = `-- name: CountTcpMiddlewaresByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
agent_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountTcpMiddlewaresByAgent(ctx context.Context, agentID *string) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countTcpMiddlewaresByAgentStmt, countTcpMiddlewaresByAgent, agentID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countTcpMiddlewaresByProfile = `-- name: CountTcpMiddlewaresByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
profile_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountTcpMiddlewaresByProfile(ctx context.Context, profileID int64) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countTcpMiddlewaresByProfileStmt, countTcpMiddlewaresByProfile, profileID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createTcpMiddleware = `-- name: CreateTcpMiddleware :one
|
||||
INSERT INTO
|
||||
tcp_middlewares (
|
||||
@@ -167,6 +199,59 @@ func (q *Queries) ListTcpMiddlewares(ctx context.Context, arg ListTcpMiddlewares
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listTcpMiddlewaresByAgent = `-- name: ListTcpMiddlewaresByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListTcpMiddlewaresByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListTcpMiddlewaresByAgent(ctx context.Context, arg ListTcpMiddlewaresByAgentParams) ([]TcpMiddleware, error) {
|
||||
rows, err := q.query(ctx, q.listTcpMiddlewaresByAgentStmt, listTcpMiddlewaresByAgent, arg.AgentID, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []TcpMiddleware
|
||||
for rows.Next() {
|
||||
var i TcpMiddleware
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.Enabled,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateTcpMiddleware = `-- name: UpdateTcpMiddleware :one
|
||||
UPDATE tcp_middlewares
|
||||
SET
|
||||
|
||||
@@ -25,6 +25,38 @@ func (q *Queries) CountTcpRouters(ctx context.Context) (int64, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countTcpRoutersByAgent = `-- name: CountTcpRoutersByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
agent_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountTcpRoutersByAgent(ctx context.Context, agentID *string) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countTcpRoutersByAgentStmt, countTcpRoutersByAgent, agentID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countTcpRoutersByProfile = `-- name: CountTcpRoutersByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
profile_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountTcpRoutersByProfile(ctx context.Context, profileID int64) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countTcpRoutersByProfileStmt, countTcpRoutersByProfile, profileID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createTcpRouter = `-- name: CreateTcpRouter :one
|
||||
INSERT INTO
|
||||
tcp_routers (
|
||||
@@ -156,6 +188,59 @@ func (q *Queries) ListTcpRouters(ctx context.Context, arg ListTcpRoutersParams)
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listTcpRoutersByAgent = `-- name: ListTcpRoutersByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListTcpRoutersByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListTcpRoutersByAgent(ctx context.Context, arg ListTcpRoutersByAgentParams) ([]TcpRouter, error) {
|
||||
rows, err := q.query(ctx, q.listTcpRoutersByAgentStmt, listTcpRoutersByAgent, arg.AgentID, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []TcpRouter
|
||||
for rows.Next() {
|
||||
var i TcpRouter
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.Enabled,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateTcpRouter = `-- name: UpdateTcpRouter :one
|
||||
UPDATE tcp_routers
|
||||
SET
|
||||
|
||||
@@ -25,6 +25,38 @@ func (q *Queries) CountTcpServices(ctx context.Context) (int64, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countTcpServicesByAgent = `-- name: CountTcpServicesByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
agent_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountTcpServicesByAgent(ctx context.Context, agentID *string) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countTcpServicesByAgentStmt, countTcpServicesByAgent, agentID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countTcpServicesByProfile = `-- name: CountTcpServicesByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
profile_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountTcpServicesByProfile(ctx context.Context, profileID int64) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countTcpServicesByProfileStmt, countTcpServicesByProfile, profileID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createTcpService = `-- name: CreateTcpService :one
|
||||
INSERT INTO
|
||||
tcp_services (
|
||||
@@ -177,6 +209,58 @@ func (q *Queries) ListTcpServices(ctx context.Context, arg ListTcpServicesParams
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listTcpServicesByAgent = `-- name: ListTcpServicesByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, created_at, updated_at
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListTcpServicesByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListTcpServicesByAgent(ctx context.Context, arg ListTcpServicesByAgentParams) ([]TcpService, error) {
|
||||
rows, err := q.query(ctx, q.listTcpServicesByAgentStmt, listTcpServicesByAgent, arg.AgentID, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []TcpService
|
||||
for rows.Next() {
|
||||
var i TcpService
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateTcpService = `-- name: UpdateTcpService :one
|
||||
UPDATE tcp_services
|
||||
SET
|
||||
|
||||
@@ -25,6 +25,38 @@ func (q *Queries) CountUdpRouters(ctx context.Context) (int64, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countUdpRoutersByAgent = `-- name: CountUdpRoutersByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
agent_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountUdpRoutersByAgent(ctx context.Context, agentID *string) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countUdpRoutersByAgentStmt, countUdpRoutersByAgent, agentID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countUdpRoutersByProfile = `-- name: CountUdpRoutersByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
profile_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountUdpRoutersByProfile(ctx context.Context, profileID int64) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countUdpRoutersByProfileStmt, countUdpRoutersByProfile, profileID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createUdpRouter = `-- name: CreateUdpRouter :one
|
||||
INSERT INTO
|
||||
udp_routers (
|
||||
@@ -156,6 +188,59 @@ func (q *Queries) ListUdpRouters(ctx context.Context, arg ListUdpRoutersParams)
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listUdpRoutersByAgent = `-- name: ListUdpRoutersByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, enabled, created_at, updated_at
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListUdpRoutersByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListUdpRoutersByAgent(ctx context.Context, arg ListUdpRoutersByAgentParams) ([]UdpRouter, error) {
|
||||
rows, err := q.query(ctx, q.listUdpRoutersByAgentStmt, listUdpRoutersByAgent, arg.AgentID, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []UdpRouter
|
||||
for rows.Next() {
|
||||
var i UdpRouter
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.Enabled,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateUdpRouter = `-- name: UpdateUdpRouter :one
|
||||
UPDATE udp_routers
|
||||
SET
|
||||
|
||||
@@ -25,6 +25,38 @@ func (q *Queries) CountUdpServices(ctx context.Context) (int64, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countUdpServicesByAgent = `-- name: CountUdpServicesByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
agent_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountUdpServicesByAgent(ctx context.Context, agentID *string) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countUdpServicesByAgentStmt, countUdpServicesByAgent, agentID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const countUdpServicesByProfile = `-- name: CountUdpServicesByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
profile_id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) CountUdpServicesByProfile(ctx context.Context, profileID int64) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countUdpServicesByProfileStmt, countUdpServicesByProfile, profileID)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createUdpService = `-- name: CreateUdpService :one
|
||||
INSERT INTO
|
||||
udp_services (
|
||||
@@ -177,6 +209,58 @@ func (q *Queries) ListUdpServices(ctx context.Context, arg ListUdpServicesParams
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listUdpServicesByAgent = `-- name: ListUdpServicesByAgent :many
|
||||
SELECT
|
||||
id, profile_id, agent_id, name, config, created_at, updated_at
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListUdpServicesByAgentParams struct {
|
||||
AgentID *string `json:"agentId"`
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListUdpServicesByAgent(ctx context.Context, arg ListUdpServicesByAgentParams) ([]UdpService, error) {
|
||||
rows, err := q.query(ctx, q.listUdpServicesByAgentStmt, listUdpServicesByAgent, arg.AgentID, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []UdpService
|
||||
for rows.Next() {
|
||||
var i UdpService
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.AgentID,
|
||||
&i.Name,
|
||||
&i.Config,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateUdpService = `-- name: UpdateUdpService :one
|
||||
UPDATE udp_services
|
||||
SET
|
||||
|
||||
@@ -42,12 +42,42 @@ LIMIT
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListHttpMiddlewaresByAgent :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountHttpMiddlewares :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_middlewares;
|
||||
|
||||
-- name: CountHttpMiddlewaresByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
profile_id = ?;
|
||||
|
||||
-- name: CountHttpMiddlewaresByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
agent_id = ?;
|
||||
|
||||
-- name: UpdateHttpMiddleware :one
|
||||
UPDATE http_middlewares
|
||||
SET
|
||||
|
||||
@@ -33,12 +33,42 @@ LIMIT
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListHttpRoutersByAgent :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountHttpRouters :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_routers;
|
||||
|
||||
-- name: CountHttpRoutersByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
profile_id = ?;
|
||||
|
||||
-- name: CountHttpRoutersByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
agent_id = ?;
|
||||
|
||||
-- name: UpdateHttpRouter :one
|
||||
UPDATE http_routers
|
||||
SET
|
||||
|
||||
@@ -41,12 +41,42 @@ LIMIT
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListHttpServicesByAgent :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountHttpServices :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_services;
|
||||
|
||||
-- name: CountHttpServicesByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
profile_id = ?;
|
||||
|
||||
-- name: CountHttpServicesByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
agent_id = ?;
|
||||
|
||||
-- name: UpdateHttpService :one
|
||||
UPDATE http_services
|
||||
SET
|
||||
|
||||
75
internal/store/queries/middlewares.sql
Normal file
75
internal/store/queries/middlewares.sql
Normal file
@@ -0,0 +1,75 @@
|
||||
-- name: ListMiddlewaresByProfile :many
|
||||
SELECT
|
||||
*,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
http_middlewares.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
tcp_middlewares.profile_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListMiddlewaresByAgent :many
|
||||
SELECT
|
||||
*,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
http_middlewares.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
tcp_middlewares.agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountMiddlewaresByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
http_middlewares.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
tcp_middlewares.profile_id = ?;
|
||||
|
||||
-- name: CountMiddlewaresByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_middlewares
|
||||
WHERE
|
||||
http_middlewares.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
tcp_middlewares.agent_id = ?;
|
||||
105
internal/store/queries/routers.sql
Normal file
105
internal/store/queries/routers.sql
Normal file
@@ -0,0 +1,105 @@
|
||||
-- name: ListRoutersByProfile :many
|
||||
SELECT
|
||||
*,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
http_routers.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
tcp_routers.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'udp' AS type
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
udp_routers.profile_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListRoutersByAgent :many
|
||||
SELECT
|
||||
*,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
http_routers.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
tcp_routers.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'udp' AS type
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
udp_routers.agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountRoutersByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
http_routers.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
tcp_routers.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
udp_routers.profile_id = ?;
|
||||
|
||||
-- name: CountRoutersByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_routers
|
||||
WHERE
|
||||
http_routers.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
tcp_routers.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
udp_routers.agent_id = ?;
|
||||
105
internal/store/queries/services.sql
Normal file
105
internal/store/queries/services.sql
Normal file
@@ -0,0 +1,105 @@
|
||||
-- name: ListServicesByProfile :many
|
||||
SELECT
|
||||
*,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
http_services.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
tcp_services.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'udp' AS type
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
udp_services.profile_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListServicesByAgent :many
|
||||
SELECT
|
||||
*,
|
||||
'http' AS type
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
http_services.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'tcp' AS type
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
tcp_services.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
*,
|
||||
'udp' AS type
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
udp_services.agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountServicesByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
http_services.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
tcp_services.profile_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
udp_services.profile_id = ?;
|
||||
|
||||
-- name: CountServicesByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
http_services
|
||||
WHERE
|
||||
http_services.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
tcp_services.agent_id = ?
|
||||
UNION ALL
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
udp_services.agent_id = ?;
|
||||
@@ -42,12 +42,42 @@ LIMIT
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListTcpMiddlewaresByAgent :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountTcpMiddlewares :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_middlewares;
|
||||
|
||||
-- name: CountTcpMiddlewaresByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
profile_id = ?;
|
||||
|
||||
-- name: CountTcpMiddlewaresByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_middlewares
|
||||
WHERE
|
||||
agent_id = ?;
|
||||
|
||||
-- name: UpdateTcpMiddleware :one
|
||||
UPDATE tcp_middlewares
|
||||
SET
|
||||
|
||||
@@ -33,12 +33,42 @@ LIMIT
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListTcpRoutersByAgent :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountTcpRouters :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_routers;
|
||||
|
||||
-- name: CountTcpRoutersByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
profile_id = ?;
|
||||
|
||||
-- name: CountTcpRoutersByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_routers
|
||||
WHERE
|
||||
agent_id = ?;
|
||||
|
||||
-- name: UpdateTcpRouter :one
|
||||
UPDATE tcp_routers
|
||||
SET
|
||||
|
||||
@@ -41,12 +41,42 @@ LIMIT
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListTcpServicesByAgent :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountTcpServices :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_services;
|
||||
|
||||
-- name: CountTcpServicesByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
profile_id = ?;
|
||||
|
||||
-- name: CountTcpServicesByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
tcp_services
|
||||
WHERE
|
||||
agent_id = ?;
|
||||
|
||||
-- name: UpdateTcpService :one
|
||||
UPDATE tcp_services
|
||||
SET
|
||||
|
||||
@@ -33,12 +33,42 @@ LIMIT
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListUdpRoutersByAgent :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountUdpRouters :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_routers;
|
||||
|
||||
-- name: CountUdpRoutersByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
profile_id = ?;
|
||||
|
||||
-- name: CountUdpRoutersByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_routers
|
||||
WHERE
|
||||
agent_id = ?;
|
||||
|
||||
-- name: UpdateUdpRouter :one
|
||||
UPDATE udp_routers
|
||||
SET
|
||||
|
||||
@@ -41,12 +41,42 @@ LIMIT
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: ListUdpServicesByAgent :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
agent_id = ?
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountUdpServices :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_services;
|
||||
|
||||
-- name: CountUdpServicesByProfile :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
profile_id = ?;
|
||||
|
||||
-- name: CountUdpServicesByAgent :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
udp_services
|
||||
WHERE
|
||||
agent_id = ?;
|
||||
|
||||
-- name: UpdateUdpService :one
|
||||
UPDATE udp_services
|
||||
SET
|
||||
|
||||
@@ -808,9 +808,10 @@ func (*DeleteMiddlewareResponse) Descriptor() ([]byte, []int) {
|
||||
type ListMiddlewaresRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ProfileId int64 `protobuf:"varint,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"`
|
||||
Type *MiddlewareType `protobuf:"varint,2,opt,name=type,proto3,enum=mantrae.v1.MiddlewareType,oneof" json:"type,omitempty"`
|
||||
Limit *int64 `protobuf:"varint,3,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
|
||||
Offset *int64 `protobuf:"varint,4,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
|
||||
AgentId *string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3,oneof" json:"agent_id,omitempty"`
|
||||
Type *MiddlewareType `protobuf:"varint,3,opt,name=type,proto3,enum=mantrae.v1.MiddlewareType,oneof" json:"type,omitempty"`
|
||||
Limit *int64 `protobuf:"varint,4,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
|
||||
Offset *int64 `protobuf:"varint,5,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -852,6 +853,13 @@ func (x *ListMiddlewaresRequest) GetProfileId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListMiddlewaresRequest) GetAgentId() string {
|
||||
if x != nil && x.AgentId != nil {
|
||||
return *x.AgentId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListMiddlewaresRequest) GetType() MiddlewareType {
|
||||
if x != nil && x.Type != nil {
|
||||
return *x.Type
|
||||
@@ -1127,96 +1135,100 @@ var file_mantrae_v1_middleware_proto_rawDesc = string([]byte{
|
||||
0x54, 0x79, 0x70, 0x65, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10,
|
||||
0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0xb9, 0x02, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x64,
|
||||
0x6e, 0x73, 0x65, 0x22, 0xef, 0x02, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x64,
|
||||
0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29,
|
||||
0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09,
|
||||
0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52,
|
||||
0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x71, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69,
|
||||
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x56, 0xba, 0x48, 0x53, 0xba, 0x01, 0x50, 0x0a,
|
||||
0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x29, 0x6c, 0x69,
|
||||
0x6d, 0x69, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x65, 0x69, 0x74, 0x68,
|
||||
0x65, 0x72, 0x20, 0x2d, 0x31, 0x20, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72,
|
||||
0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x30, 0x1a, 0x16, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d,
|
||||
0x20, 0x2d, 0x31, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x30, 0x48,
|
||||
0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x06, 0x6f,
|
||||
0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04,
|
||||
0x22, 0x02, 0x28, 0x00, 0x48, 0x02, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01,
|
||||
0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22,
|
||||
0x74, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72,
|
||||
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x6d, 0x69,
|
||||
0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x64,
|
||||
0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77,
|
||||
0x61, 0x72, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x64, 0x64,
|
||||
0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x22, 0x4c, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c,
|
||||
0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69,
|
||||
0x6e, 0x73, 0x2a, 0x64, 0x0a, 0x0e, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x49, 0x44, 0x44, 0x4c, 0x45, 0x57, 0x41,
|
||||
0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
|
||||
0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x49, 0x44, 0x44, 0x4c, 0x45, 0x57,
|
||||
0x41, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12,
|
||||
0x17, 0x0a, 0x13, 0x4d, 0x49, 0x44, 0x44, 0x4c, 0x45, 0x57, 0x41, 0x52, 0x45, 0x5f, 0x54, 0x59,
|
||||
0x50, 0x45, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x02, 0x32, 0xdc, 0x04, 0x0a, 0x11, 0x4d, 0x69, 0x64,
|
||||
0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59,
|
||||
0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x12,
|
||||
0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x5d, 0x0a, 0x10, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x12, 0x23, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x12, 0x23, 0x2e, 0x6d,
|
||||
0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d,
|
||||
0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x69,
|
||||
0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c,
|
||||
0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d,
|
||||
0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x6e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4d, 0x69,
|
||||
0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12,
|
||||
0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77,
|
||||
0x61, 0x72, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x42, 0xa9, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x4d, 0x69, 0x64, 0x64,
|
||||
0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x7a, 0x75, 0x63, 0x68,
|
||||
0x69, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f,
|
||||
0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d,
|
||||
0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x56, 0x31, 0xca,
|
||||
0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x4d,
|
||||
0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
|
||||
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x3a,
|
||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x08, 0x61, 0x67, 0x65,
|
||||
0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04,
|
||||
0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88,
|
||||
0x01, 0x01, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69,
|
||||
0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xba, 0x48,
|
||||
0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x48, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01,
|
||||
0x01, 0x12, 0x71, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
|
||||
0x42, 0x56, 0xba, 0x48, 0x53, 0xba, 0x01, 0x50, 0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x29, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x20, 0x6d, 0x75, 0x73,
|
||||
0x74, 0x20, 0x62, 0x65, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x2d, 0x31, 0x20, 0x6f,
|
||||
0x72, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x30,
|
||||
0x1a, 0x16, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x20, 0x7c, 0x7c, 0x20,
|
||||
0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x30, 0x48, 0x02, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69,
|
||||
0x74, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x00, 0x48, 0x03, 0x52,
|
||||
0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65,
|
||||
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f,
|
||||
0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x74, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x69, 0x64,
|
||||
0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x38, 0x0a, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x0b, 0x6d,
|
||||
0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f,
|
||||
0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x47,
|
||||
0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x6c, 0x75, 0x67,
|
||||
0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4c, 0x0a, 0x1c, 0x47, 0x65,
|
||||
0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69,
|
||||
0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x70, 0x6c,
|
||||
0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
|
||||
0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2a, 0x64, 0x0a, 0x0e, 0x4d, 0x69, 0x64, 0x64,
|
||||
0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x49,
|
||||
0x44, 0x44, 0x4c, 0x45, 0x57, 0x41, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
|
||||
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x4d,
|
||||
0x49, 0x44, 0x44, 0x4c, 0x45, 0x57, 0x41, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48,
|
||||
0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x49, 0x44, 0x44, 0x4c, 0x45, 0x57,
|
||||
0x41, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x02, 0x32, 0xdc,
|
||||
0x04, 0x0a, 0x11, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c,
|
||||
0x65, 0x77, 0x61, 0x72, 0x65, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61,
|
||||
0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12,
|
||||
0x5d, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77,
|
||||
0x61, 0x72, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64,
|
||||
0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d,
|
||||
0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61,
|
||||
0x72, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c,
|
||||
0x65, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a,
|
||||
0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72,
|
||||
0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65,
|
||||
0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0f,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x12,
|
||||
0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x6e, 0x0a,
|
||||
0x14, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x6c,
|
||||
0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65,
|
||||
0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28,
|
||||
0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d,
|
||||
0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x42, 0xa9, 0x01,
|
||||
0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x42, 0x0f, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x6d, 0x69, 0x7a, 0x75, 0x63, 0x68, 0x69, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65,
|
||||
0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c,
|
||||
0x56, 0x31, 0xe2, 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c, 0x56, 0x31, 0x5c,
|
||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
})
|
||||
|
||||
var (
|
||||
|
||||
@@ -619,9 +619,10 @@ func (*DeleteRouterResponse) Descriptor() ([]byte, []int) {
|
||||
type ListRoutersRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ProfileId int64 `protobuf:"varint,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"`
|
||||
Type *RouterType `protobuf:"varint,2,opt,name=type,proto3,enum=mantrae.v1.RouterType,oneof" json:"type,omitempty"`
|
||||
Limit *int64 `protobuf:"varint,3,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
|
||||
Offset *int64 `protobuf:"varint,4,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
|
||||
AgentId *string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3,oneof" json:"agent_id,omitempty"`
|
||||
Type *RouterType `protobuf:"varint,3,opt,name=type,proto3,enum=mantrae.v1.RouterType,oneof" json:"type,omitempty"`
|
||||
Limit *int64 `protobuf:"varint,4,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
|
||||
Offset *int64 `protobuf:"varint,5,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -663,6 +664,13 @@ func (x *ListRoutersRequest) GetProfileId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListRoutersRequest) GetAgentId() string {
|
||||
if x != nil && x.AgentId != nil {
|
||||
return *x.AgentId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListRoutersRequest) GetType() RouterType {
|
||||
if x != nil && x.Type != nil {
|
||||
return *x.Type
|
||||
@@ -825,77 +833,81 @@ var file_mantrae_v1_router_proto_rawDesc = string([]byte{
|
||||
0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0b, 0xba, 0x48,
|
||||
0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22,
|
||||
0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe7, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29,
|
||||
0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09,
|
||||
0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42,
|
||||
0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70,
|
||||
0x65, 0x88, 0x01, 0x01, 0x12, 0x71, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x03, 0x42, 0x56, 0xba, 0x48, 0x53, 0xba, 0x01, 0x50, 0x0a, 0x0b, 0x6c, 0x69, 0x6d,
|
||||
0x69, 0x74, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x29, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x20,
|
||||
0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x2d,
|
||||
0x31, 0x20, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61,
|
||||
0x6e, 0x20, 0x30, 0x1a, 0x16, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x20,
|
||||
0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x30, 0x48, 0x01, 0x52, 0x05, 0x6c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65,
|
||||
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x00,
|
||||
0x48, 0x02, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a,
|
||||
0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74,
|
||||
0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x64, 0x0a, 0x13, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73,
|
||||
0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x2a, 0x69, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x1b, 0x0a, 0x17, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
|
||||
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
|
||||
0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x54, 0x54, 0x50,
|
||||
0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50,
|
||||
0x45, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x4f, 0x55, 0x54, 0x45,
|
||||
0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x44, 0x50, 0x10, 0x03, 0x32, 0xac, 0x03, 0x0a,
|
||||
0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4d,
|
||||
0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x51, 0x0a,
|
||||
0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20,
|
||||
0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x51, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x75,
|
||||
0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x08, 0x61, 0x67, 0x65,
|
||||
0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04,
|
||||
0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88,
|
||||
0x01, 0x01, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02,
|
||||
0x10, 0x01, 0x48, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x71, 0x0a,
|
||||
0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x56, 0xba, 0x48,
|
||||
0x53, 0xba, 0x01, 0x50, 0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x61, 0x6c, 0x69,
|
||||
0x64, 0x12, 0x29, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65,
|
||||
0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x2d, 0x31, 0x20, 0x6f, 0x72, 0x20, 0x67, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x30, 0x1a, 0x16, 0x74, 0x68,
|
||||
0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73,
|
||||
0x20, 0x3e, 0x20, 0x30, 0x48, 0x02, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01,
|
||||
0x12, 0x24, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
|
||||
0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x00, 0x48, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66,
|
||||
0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74,
|
||||
0x5f, 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x08, 0x0a, 0x06,
|
||||
0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65,
|
||||
0x74, 0x22, 0x64, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x07, 0x72,
|
||||
0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x2a, 0x69, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f,
|
||||
0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
|
||||
0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50,
|
||||
0x45, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x4f, 0x55, 0x54,
|
||||
0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x44, 0x50,
|
||||
0x10, 0x03, 0x32, 0xac, 0x03, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x72, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03,
|
||||
0x90, 0x02, 0x01, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x42, 0xa5, 0x01, 0x0a, 0x0e,
|
||||
0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x7a, 0x75, 0x63, 0x68,
|
||||
0x69, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f,
|
||||
0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d,
|
||||
0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x56, 0x31, 0xca,
|
||||
0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x4d,
|
||||
0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
|
||||
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x3a,
|
||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x6e,
|
||||
0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0b,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02,
|
||||
0x01, 0x42, 0xa5, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x6d, 0x69, 0x7a, 0x75, 0x63, 0x68, 0x69, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65,
|
||||
0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c,
|
||||
0x56, 0x31, 0xe2, 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c, 0x56, 0x31, 0x5c,
|
||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
})
|
||||
|
||||
var (
|
||||
|
||||
@@ -595,9 +595,10 @@ func (*DeleteServiceResponse) Descriptor() ([]byte, []int) {
|
||||
type ListServicesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
ProfileId int64 `protobuf:"varint,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"`
|
||||
Type *ServiceType `protobuf:"varint,2,opt,name=type,proto3,enum=mantrae.v1.ServiceType,oneof" json:"type,omitempty"`
|
||||
Limit *int64 `protobuf:"varint,3,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
|
||||
Offset *int64 `protobuf:"varint,4,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
|
||||
AgentId *string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3,oneof" json:"agent_id,omitempty"`
|
||||
Type *ServiceType `protobuf:"varint,3,opt,name=type,proto3,enum=mantrae.v1.ServiceType,oneof" json:"type,omitempty"`
|
||||
Limit *int64 `protobuf:"varint,4,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
|
||||
Offset *int64 `protobuf:"varint,5,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -639,6 +640,13 @@ func (x *ListServicesRequest) GetProfileId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListServicesRequest) GetAgentId() string {
|
||||
if x != nil && x.AgentId != nil {
|
||||
return *x.AgentId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListServicesRequest) GetType() ServiceType {
|
||||
if x != nil && x.Type != nil {
|
||||
return *x.Type
|
||||
@@ -798,79 +806,82 @@ var file_mantrae_v1_service_proto_rawDesc = string([]byte{
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02,
|
||||
0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0xb3, 0x02, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x22, 0xe9, 0x02, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0a, 0x70, 0x72, 0x6f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0a, 0xba,
|
||||
0x48, 0x07, 0xc8, 0x01, 0x01, 0x22, 0x02, 0x20, 0x00, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05,
|
||||
0x82, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01,
|
||||
0x12, 0x71, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42,
|
||||
0x56, 0xba, 0x48, 0x53, 0xba, 0x01, 0x50, 0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76,
|
||||
0x61, 0x6c, 0x69, 0x64, 0x12, 0x29, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74,
|
||||
0x20, 0x62, 0x65, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x2d, 0x31, 0x20, 0x6f, 0x72,
|
||||
0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x30, 0x1a,
|
||||
0x16, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x2d, 0x31, 0x20, 0x7c, 0x7c, 0x20, 0x74,
|
||||
0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x30, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74,
|
||||
0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x00, 0x48, 0x02, 0x52, 0x06,
|
||||
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79,
|
||||
0x70, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07,
|
||||
0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x68, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x2f, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x2a, 0x6e, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x12, 0x1c, 0x0a, 0x18, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45,
|
||||
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15,
|
||||
0x0a, 0x11, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48,
|
||||
0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45,
|
||||
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53,
|
||||
0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x44, 0x50, 0x10,
|
||||
0x03, 0x32, 0xbc, 0x03, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x12, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x54, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0d,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x6c, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48,
|
||||
0x00, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a,
|
||||
0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x48, 0x01,
|
||||
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x71, 0x0a, 0x05, 0x6c, 0x69, 0x6d,
|
||||
0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x56, 0xba, 0x48, 0x53, 0xba, 0x01, 0x50,
|
||||
0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x29, 0x6c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x65, 0x69, 0x74,
|
||||
0x68, 0x65, 0x72, 0x20, 0x2d, 0x31, 0x20, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x30, 0x1a, 0x16, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d,
|
||||
0x3d, 0x20, 0x2d, 0x31, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x30,
|
||||
0x48, 0x02, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x06,
|
||||
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48,
|
||||
0x04, 0x22, 0x02, 0x28, 0x00, 0x48, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88,
|
||||
0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x42,
|
||||
0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x69, 0x6d,
|
||||
0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x68, 0x0a,
|
||||
0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x2a, 0x6e, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43,
|
||||
0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
||||
0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f,
|
||||
0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53,
|
||||
0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x43, 0x50, 0x10,
|
||||
0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50,
|
||||
0x45, 0x5f, 0x55, 0x44, 0x50, 0x10, 0x03, 0x32, 0xbc, 0x03, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x47, 0x65,
|
||||
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x54, 0x0a, 0x0d,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,
|
||||
0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76,
|
||||
0x73, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
|
||||
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01,
|
||||
0x42, 0xa6, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x6d, 0x69, 0x7a, 0x75, 0x63, 0x68, 0x69, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65,
|
||||
0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c,
|
||||
0x56, 0x31, 0xe2, 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c, 0x56, 0x31, 0x5c,
|
||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56,
|
||||
0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1f,
|
||||
0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x42, 0xa6, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d,
|
||||
0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x7a, 0x75, 0x63, 0x68, 0x69, 0x6c, 0x61, 0x62,
|
||||
0x73, 0x2f, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
|
||||
0x67, 0x65, 0x6e, 0x2f, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d,
|
||||
0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02,
|
||||
0x0a, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x4d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0xea, 0x02, 0x0b, 0x4d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
})
|
||||
|
||||
var (
|
||||
|
||||
@@ -1164,6 +1164,11 @@ components:
|
||||
- string
|
||||
title: profile_id
|
||||
format: int64
|
||||
agentId:
|
||||
type: string
|
||||
title: agent_id
|
||||
minLength: 1
|
||||
nullable: true
|
||||
type:
|
||||
title: type
|
||||
nullable: true
|
||||
@@ -1610,6 +1615,11 @@ components:
|
||||
- string
|
||||
title: profile_id
|
||||
format: int64
|
||||
agentId:
|
||||
type: string
|
||||
title: agent_id
|
||||
minLength: 1
|
||||
nullable: true
|
||||
type:
|
||||
title: type
|
||||
nullable: true
|
||||
@@ -1832,6 +1842,11 @@ components:
|
||||
- string
|
||||
title: profile_id
|
||||
format: int64
|
||||
agentId:
|
||||
type: string
|
||||
title: agent_id
|
||||
minLength: 1
|
||||
nullable: true
|
||||
type:
|
||||
title: type
|
||||
nullable: true
|
||||
|
||||
@@ -132,13 +132,14 @@ message ListMiddlewaresRequest {
|
||||
(buf.validate.field).required = true,
|
||||
(buf.validate.field).int64.gt = 0
|
||||
];
|
||||
optional MiddlewareType type = 2 [(buf.validate.field).enum.defined_only = true];
|
||||
optional int64 limit = 3 [(buf.validate.field).cel = {
|
||||
optional string agent_id = 2 [(buf.validate.field).string.min_len = 1];
|
||||
optional MiddlewareType type = 3 [(buf.validate.field).enum.defined_only = true];
|
||||
optional int64 limit = 4 [(buf.validate.field).cel = {
|
||||
id: "limit.valid"
|
||||
message: "limit must be either -1 or greater than 0"
|
||||
expression: "this == -1 || this > 0"
|
||||
}];
|
||||
optional int64 offset = 4 [(buf.validate.field).int64.gte = 0];
|
||||
optional int64 offset = 5 [(buf.validate.field).int64.gte = 0];
|
||||
}
|
||||
message ListMiddlewaresResponse {
|
||||
repeated Middleware middlewares = 1;
|
||||
|
||||
@@ -109,13 +109,14 @@ message ListRoutersRequest {
|
||||
(buf.validate.field).required = true,
|
||||
(buf.validate.field).int64.gt = 0
|
||||
];
|
||||
optional RouterType type = 2 [(buf.validate.field).enum.defined_only = true];
|
||||
optional int64 limit = 3 [(buf.validate.field).cel = {
|
||||
optional string agent_id = 2 [(buf.validate.field).string.min_len = 1];
|
||||
optional RouterType type = 3 [(buf.validate.field).enum.defined_only = true];
|
||||
optional int64 limit = 4 [(buf.validate.field).cel = {
|
||||
id: "limit.valid"
|
||||
message: "limit must be either -1 or greater than 0"
|
||||
expression: "this == -1 || this > 0"
|
||||
}];
|
||||
optional int64 offset = 4 [(buf.validate.field).int64.gte = 0];
|
||||
optional int64 offset = 5 [(buf.validate.field).int64.gte = 0];
|
||||
}
|
||||
message ListRoutersResponse {
|
||||
repeated Router routers = 1;
|
||||
|
||||
@@ -106,13 +106,14 @@ message ListServicesRequest {
|
||||
(buf.validate.field).required = true,
|
||||
(buf.validate.field).int64.gt = 0
|
||||
];
|
||||
optional ServiceType type = 2 [(buf.validate.field).enum.defined_only = true];
|
||||
optional int64 limit = 3 [(buf.validate.field).cel = {
|
||||
optional string agent_id = 2 [(buf.validate.field).string.min_len = 1];
|
||||
optional ServiceType type = 3 [(buf.validate.field).enum.defined_only = true];
|
||||
optional int64 limit = 4 [(buf.validate.field).cel = {
|
||||
id: "limit.valid"
|
||||
message: "limit must be either -1 or greater than 0"
|
||||
expression: "this == -1 || this > 0"
|
||||
}];
|
||||
optional int64 offset = 4 [(buf.validate.field).int64.gte = 0];
|
||||
optional int64 offset = 5 [(buf.validate.field).int64.gte = 0];
|
||||
}
|
||||
message ListServicesResponse {
|
||||
repeated Service services = 1;
|
||||
|
||||
@@ -13,7 +13,7 @@ import type { JsonObject, Message } from "@bufbuild/protobuf";
|
||||
* Describes the file mantrae/v1/middleware.proto.
|
||||
*/
|
||||
export const file_mantrae_v1_middleware: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChttYW50cmFlL3YxL21pZGRsZXdhcmUucHJvdG8SCm1hbnRyYWUudjEi/wEKCk1pZGRsZXdhcmUSCgoCaWQYASABKAMSEgoKcHJvZmlsZV9pZBgCIAEoAxIQCghhZ2VudF9pZBgDIAEoCRIMCgRuYW1lGAQgASgJEicKBmNvbmZpZxgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSKAoEdHlwZRgGIAEoDjIaLm1hbnRyYWUudjEuTWlkZGxld2FyZVR5cGUSLgoKY3JlYXRlZF9hdBgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAipgIKBlBsdWdpbhIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEhQKDGRpc3BsYXlfbmFtZRgDIAEoCRIOCgZhdXRob3IYBCABKAkSDAoEdHlwZRgFIAEoCRIOCgZpbXBvcnQYBiABKAkSDwoHc3VtbWFyeRgHIAEoCRIQCghpY29uX3VybBgIIAEoCRISCgpiYW5uZXJfdXJsGAkgASgJEg4KBnJlYWRtZRgKIAEoCRIWCg5sYXRlc3RfdmVyc2lvbhgLIAEoCRIQCgh2ZXJzaW9ucxgMIAMoCRINCgVzdGFycxgNIAEoAxIqCgdzbmlwcGV0GA4gASgLMhkubWFudHJhZS52MS5QbHVnaW5TbmlwcGV0EhIKCmNyZWF0ZWRfYXQYDyABKAkiOAoNUGx1Z2luU25pcHBldBILCgNrOHMYASABKAkSDAoEeWFtbBgCIAEoCRIMCgR0b21sGAMgASgJImUKFEdldE1pZGRsZXdhcmVSZXF1ZXN0EhYKAmlkGAEgASgDQgq6SAfIAQEiAiAAEjUKBHR5cGUYAiABKA4yGi5tYW50cmFlLnYxLk1pZGRsZXdhcmVUeXBlQgu6SAjIAQGCAQIQASJDChVHZXRNaWRkbGV3YXJlUmVzcG9uc2USKgoKbWlkZGxld2FyZRgBIAEoCzIWLm1hbnRyYWUudjEuTWlkZGxld2FyZSLFAQoXQ3JlYXRlTWlkZGxld2FyZVJlcXVlc3QSHgoKcHJvZmlsZV9pZBgBIAEoA0IKukgHyAEBIgIgABIQCghhZ2VudF9pZBgCIAEoCRIYCgRuYW1lGAMgASgJQgq6SAfIAQFyAhABEicKBmNvbmZpZxgEIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSNQoEdHlwZRgFIAEoDjIaLm1hbnRyYWUudjEuTWlkZGxld2FyZVR5cGVCC7pICMgBAYIBAhABIkYKGENyZWF0ZU1pZGRsZXdhcmVSZXNwb25zZRIqCgptaWRkbGV3YXJlGAEgASgLMhYubWFudHJhZS52MS5NaWRkbGV3YXJlIqsBChdVcGRhdGVNaWRkbGV3YXJlUmVxdWVzdBIWCgJpZBgBIAEoA0IKukgHyAEBIgIgABIYCgRuYW1lGAIgASgJQgq6SAfIAQFyAhABEicKBmNvbmZpZxgDIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSNQoEdHlwZRgEIAEoDjIaLm1hbnRyYWUudjEuTWlkZGxld2FyZVR5cGVCC7pICMgBAYIBAhABIkYKGFVwZGF0ZU1pZGRsZXdhcmVSZXNwb25zZRIqCgptaWRkbGV3YXJlGAEgASgLMhYubWFudHJhZS52MS5NaWRkbGV3YXJlImgKF0RlbGV0ZU1pZGRsZXdhcmVSZXF1ZXN0EhYKAmlkGAEgASgDQgq6SAfIAQEiAiAAEjUKBHR5cGUYAiABKA4yGi5tYW50cmFlLnYxLk1pZGRsZXdhcmVUeXBlQgu6SAjIAQGCAQIQASIaChhEZWxldGVNaWRkbGV3YXJlUmVzcG9uc2UimQIKFkxpc3RNaWRkbGV3YXJlc1JlcXVlc3QSHgoKcHJvZmlsZV9pZBgBIAEoA0IKukgHyAEBIgIgABI3CgR0eXBlGAIgASgOMhoubWFudHJhZS52MS5NaWRkbGV3YXJlVHlwZUIIukgFggECEAFIAIgBARJqCgVsaW1pdBgDIAEoA0JWukhTugFQCgtsaW1pdC52YWxpZBIpbGltaXQgbXVzdCBiZSBlaXRoZXIgLTEgb3IgZ3JlYXRlciB0aGFuIDAaFnRoaXMgPT0gLTEgfHwgdGhpcyA+IDBIAYgBARIcCgZvZmZzZXQYBCABKANCB7pIBCICKABIAogBAUIHCgVfdHlwZUIICgZfbGltaXRCCQoHX29mZnNldCJbChdMaXN0TWlkZGxld2FyZXNSZXNwb25zZRIrCgttaWRkbGV3YXJlcxgBIAMoCzIWLm1hbnRyYWUudjEuTWlkZGxld2FyZRITCgt0b3RhbF9jb3VudBgCIAEoAyIdChtHZXRNaWRkbGV3YXJlUGx1Z2luc1JlcXVlc3QiQwocR2V0TWlkZGxld2FyZVBsdWdpbnNSZXNwb25zZRIjCgdwbHVnaW5zGAEgAygLMhIubWFudHJhZS52MS5QbHVnaW4qZAoOTWlkZGxld2FyZVR5cGUSHwobTUlERExFV0FSRV9UWVBFX1VOU1BFQ0lGSUVEEAASGAoUTUlERExFV0FSRV9UWVBFX0hUVFAQARIXChNNSURETEVXQVJFX1RZUEVfVENQEAIy3AQKEU1pZGRsZXdhcmVTZXJ2aWNlElkKDUdldE1pZGRsZXdhcmUSIC5tYW50cmFlLnYxLkdldE1pZGRsZXdhcmVSZXF1ZXN0GiEubWFudHJhZS52MS5HZXRNaWRkbGV3YXJlUmVzcG9uc2UiA5ACARJdChBDcmVhdGVNaWRkbGV3YXJlEiMubWFudHJhZS52MS5DcmVhdGVNaWRkbGV3YXJlUmVxdWVzdBokLm1hbnRyYWUudjEuQ3JlYXRlTWlkZGxld2FyZVJlc3BvbnNlEl0KEFVwZGF0ZU1pZGRsZXdhcmUSIy5tYW50cmFlLnYxLlVwZGF0ZU1pZGRsZXdhcmVSZXF1ZXN0GiQubWFudHJhZS52MS5VcGRhdGVNaWRkbGV3YXJlUmVzcG9uc2USXQoQRGVsZXRlTWlkZGxld2FyZRIjLm1hbnRyYWUudjEuRGVsZXRlTWlkZGxld2FyZVJlcXVlc3QaJC5tYW50cmFlLnYxLkRlbGV0ZU1pZGRsZXdhcmVSZXNwb25zZRJfCg9MaXN0TWlkZGxld2FyZXMSIi5tYW50cmFlLnYxLkxpc3RNaWRkbGV3YXJlc1JlcXVlc3QaIy5tYW50cmFlLnYxLkxpc3RNaWRkbGV3YXJlc1Jlc3BvbnNlIgOQAgESbgoUR2V0TWlkZGxld2FyZVBsdWdpbnMSJy5tYW50cmFlLnYxLkdldE1pZGRsZXdhcmVQbHVnaW5zUmVxdWVzdBooLm1hbnRyYWUudjEuR2V0TWlkZGxld2FyZVBsdWdpbnNSZXNwb25zZSIDkAIBQqkBCg5jb20ubWFudHJhZS52MUIPTWlkZGxld2FyZVByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp]);
|
||||
fileDesc("ChttYW50cmFlL3YxL21pZGRsZXdhcmUucHJvdG8SCm1hbnRyYWUudjEi/wEKCk1pZGRsZXdhcmUSCgoCaWQYASABKAMSEgoKcHJvZmlsZV9pZBgCIAEoAxIQCghhZ2VudF9pZBgDIAEoCRIMCgRuYW1lGAQgASgJEicKBmNvbmZpZxgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSKAoEdHlwZRgGIAEoDjIaLm1hbnRyYWUudjEuTWlkZGxld2FyZVR5cGUSLgoKY3JlYXRlZF9hdBgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAipgIKBlBsdWdpbhIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEhQKDGRpc3BsYXlfbmFtZRgDIAEoCRIOCgZhdXRob3IYBCABKAkSDAoEdHlwZRgFIAEoCRIOCgZpbXBvcnQYBiABKAkSDwoHc3VtbWFyeRgHIAEoCRIQCghpY29uX3VybBgIIAEoCRISCgpiYW5uZXJfdXJsGAkgASgJEg4KBnJlYWRtZRgKIAEoCRIWCg5sYXRlc3RfdmVyc2lvbhgLIAEoCRIQCgh2ZXJzaW9ucxgMIAMoCRINCgVzdGFycxgNIAEoAxIqCgdzbmlwcGV0GA4gASgLMhkubWFudHJhZS52MS5QbHVnaW5TbmlwcGV0EhIKCmNyZWF0ZWRfYXQYDyABKAkiOAoNUGx1Z2luU25pcHBldBILCgNrOHMYASABKAkSDAoEeWFtbBgCIAEoCRIMCgR0b21sGAMgASgJImUKFEdldE1pZGRsZXdhcmVSZXF1ZXN0EhYKAmlkGAEgASgDQgq6SAfIAQEiAiAAEjUKBHR5cGUYAiABKA4yGi5tYW50cmFlLnYxLk1pZGRsZXdhcmVUeXBlQgu6SAjIAQGCAQIQASJDChVHZXRNaWRkbGV3YXJlUmVzcG9uc2USKgoKbWlkZGxld2FyZRgBIAEoCzIWLm1hbnRyYWUudjEuTWlkZGxld2FyZSLFAQoXQ3JlYXRlTWlkZGxld2FyZVJlcXVlc3QSHgoKcHJvZmlsZV9pZBgBIAEoA0IKukgHyAEBIgIgABIQCghhZ2VudF9pZBgCIAEoCRIYCgRuYW1lGAMgASgJQgq6SAfIAQFyAhABEicKBmNvbmZpZxgEIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSNQoEdHlwZRgFIAEoDjIaLm1hbnRyYWUudjEuTWlkZGxld2FyZVR5cGVCC7pICMgBAYIBAhABIkYKGENyZWF0ZU1pZGRsZXdhcmVSZXNwb25zZRIqCgptaWRkbGV3YXJlGAEgASgLMhYubWFudHJhZS52MS5NaWRkbGV3YXJlIqsBChdVcGRhdGVNaWRkbGV3YXJlUmVxdWVzdBIWCgJpZBgBIAEoA0IKukgHyAEBIgIgABIYCgRuYW1lGAIgASgJQgq6SAfIAQFyAhABEicKBmNvbmZpZxgDIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSNQoEdHlwZRgEIAEoDjIaLm1hbnRyYWUudjEuTWlkZGxld2FyZVR5cGVCC7pICMgBAYIBAhABIkYKGFVwZGF0ZU1pZGRsZXdhcmVSZXNwb25zZRIqCgptaWRkbGV3YXJlGAEgASgLMhYubWFudHJhZS52MS5NaWRkbGV3YXJlImgKF0RlbGV0ZU1pZGRsZXdhcmVSZXF1ZXN0EhYKAmlkGAEgASgDQgq6SAfIAQEiAiAAEjUKBHR5cGUYAiABKA4yGi5tYW50cmFlLnYxLk1pZGRsZXdhcmVUeXBlQgu6SAjIAQGCAQIQASIaChhEZWxldGVNaWRkbGV3YXJlUmVzcG9uc2UixgIKFkxpc3RNaWRkbGV3YXJlc1JlcXVlc3QSHgoKcHJvZmlsZV9pZBgBIAEoA0IKukgHyAEBIgIgABIeCghhZ2VudF9pZBgCIAEoCUIHukgEcgIQAUgAiAEBEjcKBHR5cGUYAyABKA4yGi5tYW50cmFlLnYxLk1pZGRsZXdhcmVUeXBlQgi6SAWCAQIQAUgBiAEBEmoKBWxpbWl0GAQgASgDQla6SFO6AVAKC2xpbWl0LnZhbGlkEilsaW1pdCBtdXN0IGJlIGVpdGhlciAtMSBvciBncmVhdGVyIHRoYW4gMBoWdGhpcyA9PSAtMSB8fCB0aGlzID4gMEgCiAEBEhwKBm9mZnNldBgFIAEoA0IHukgEIgIoAEgDiAEBQgsKCV9hZ2VudF9pZEIHCgVfdHlwZUIICgZfbGltaXRCCQoHX29mZnNldCJbChdMaXN0TWlkZGxld2FyZXNSZXNwb25zZRIrCgttaWRkbGV3YXJlcxgBIAMoCzIWLm1hbnRyYWUudjEuTWlkZGxld2FyZRITCgt0b3RhbF9jb3VudBgCIAEoAyIdChtHZXRNaWRkbGV3YXJlUGx1Z2luc1JlcXVlc3QiQwocR2V0TWlkZGxld2FyZVBsdWdpbnNSZXNwb25zZRIjCgdwbHVnaW5zGAEgAygLMhIubWFudHJhZS52MS5QbHVnaW4qZAoOTWlkZGxld2FyZVR5cGUSHwobTUlERExFV0FSRV9UWVBFX1VOU1BFQ0lGSUVEEAASGAoUTUlERExFV0FSRV9UWVBFX0hUVFAQARIXChNNSURETEVXQVJFX1RZUEVfVENQEAIy3AQKEU1pZGRsZXdhcmVTZXJ2aWNlElkKDUdldE1pZGRsZXdhcmUSIC5tYW50cmFlLnYxLkdldE1pZGRsZXdhcmVSZXF1ZXN0GiEubWFudHJhZS52MS5HZXRNaWRkbGV3YXJlUmVzcG9uc2UiA5ACARJdChBDcmVhdGVNaWRkbGV3YXJlEiMubWFudHJhZS52MS5DcmVhdGVNaWRkbGV3YXJlUmVxdWVzdBokLm1hbnRyYWUudjEuQ3JlYXRlTWlkZGxld2FyZVJlc3BvbnNlEl0KEFVwZGF0ZU1pZGRsZXdhcmUSIy5tYW50cmFlLnYxLlVwZGF0ZU1pZGRsZXdhcmVSZXF1ZXN0GiQubWFudHJhZS52MS5VcGRhdGVNaWRkbGV3YXJlUmVzcG9uc2USXQoQRGVsZXRlTWlkZGxld2FyZRIjLm1hbnRyYWUudjEuRGVsZXRlTWlkZGxld2FyZVJlcXVlc3QaJC5tYW50cmFlLnYxLkRlbGV0ZU1pZGRsZXdhcmVSZXNwb25zZRJfCg9MaXN0TWlkZGxld2FyZXMSIi5tYW50cmFlLnYxLkxpc3RNaWRkbGV3YXJlc1JlcXVlc3QaIy5tYW50cmFlLnYxLkxpc3RNaWRkbGV3YXJlc1Jlc3BvbnNlIgOQAgESbgoUR2V0TWlkZGxld2FyZVBsdWdpbnMSJy5tYW50cmFlLnYxLkdldE1pZGRsZXdhcmVQbHVnaW5zUmVxdWVzdBooLm1hbnRyYWUudjEuR2V0TWlkZGxld2FyZVBsdWdpbnNSZXNwb25zZSIDkAIBQqkBCg5jb20ubWFudHJhZS52MUIPTWlkZGxld2FyZVByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.Middleware
|
||||
@@ -368,17 +368,22 @@ export type ListMiddlewaresRequest = Message<"mantrae.v1.ListMiddlewaresRequest"
|
||||
profileId: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: optional mantrae.v1.MiddlewareType type = 2;
|
||||
* @generated from field: optional string agent_id = 2;
|
||||
*/
|
||||
agentId?: string;
|
||||
|
||||
/**
|
||||
* @generated from field: optional mantrae.v1.MiddlewareType type = 3;
|
||||
*/
|
||||
type?: MiddlewareType;
|
||||
|
||||
/**
|
||||
* @generated from field: optional int64 limit = 3;
|
||||
* @generated from field: optional int64 limit = 4;
|
||||
*/
|
||||
limit?: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: optional int64 offset = 4;
|
||||
* @generated from field: optional int64 offset = 5;
|
||||
*/
|
||||
offset?: bigint;
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ import type { JsonObject, Message } from "@bufbuild/protobuf";
|
||||
* Describes the file mantrae/v1/router.proto.
|
||||
*/
|
||||
export const file_mantrae_v1_router: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChdtYW50cmFlL3YxL3JvdXRlci5wcm90bxIKbWFudHJhZS52MSKIAgoGUm91dGVyEgoKAmlkGAEgASgDEhIKCnByb2ZpbGVfaWQYAiABKAMSEAoIYWdlbnRfaWQYAyABKAkSDAoEbmFtZRgEIAEoCRInCgZjb25maWcYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBiABKAgSJAoEdHlwZRgHIAEoDjIWLm1hbnRyYWUudjEuUm91dGVyVHlwZRIuCgpjcmVhdGVkX2F0GAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRhdGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCJdChBHZXRSb3V0ZXJSZXF1ZXN0EhYKAmlkGAEgASgDQgq6SAfIAQEiAiAAEjEKBHR5cGUYAiABKA4yFi5tYW50cmFlLnYxLlJvdXRlclR5cGVCC7pICMgBAYIBAhABIjcKEUdldFJvdXRlclJlc3BvbnNlEiIKBnJvdXRlchgBIAEoCzISLm1hbnRyYWUudjEuUm91dGVyIs4BChNDcmVhdGVSb3V0ZXJSZXF1ZXN0Eh4KCnByb2ZpbGVfaWQYASABKANCCrpIB8gBASICIAASEAoIYWdlbnRfaWQYAiABKAkSGAoEbmFtZRgDIAEoCUIKukgHyAEBcgIQARInCgZjb25maWcYBCABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBSABKAgSMQoEdHlwZRgGIAEoDjIWLm1hbnRyYWUudjEuUm91dGVyVHlwZUILukgIyAEBggECEAEiOgoUQ3JlYXRlUm91dGVyUmVzcG9uc2USIgoGcm91dGVyGAEgASgLMhIubWFudHJhZS52MS5Sb3V0ZXIitAEKE1VwZGF0ZVJvdXRlclJlcXVlc3QSFgoCaWQYASABKANCCrpIB8gBASICIAASGAoEbmFtZRgCIAEoCUIKukgHyAEBcgIQARInCgZjb25maWcYAyABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBCABKAgSMQoEdHlwZRgFIAEoDjIWLm1hbnRyYWUudjEuUm91dGVyVHlwZUILukgIyAEBggECEAEiOgoUVXBkYXRlUm91dGVyUmVzcG9uc2USIgoGcm91dGVyGAEgASgLMhIubWFudHJhZS52MS5Sb3V0ZXIiYAoTRGVsZXRlUm91dGVyUmVxdWVzdBIWCgJpZBgBIAEoA0IKukgHyAEBIgIgABIxCgR0eXBlGAIgASgOMhYubWFudHJhZS52MS5Sb3V0ZXJUeXBlQgu6SAjIAQGCAQIQASIWChREZWxldGVSb3V0ZXJSZXNwb25zZSKRAgoSTGlzdFJvdXRlcnNSZXF1ZXN0Eh4KCnByb2ZpbGVfaWQYASABKANCCrpIB8gBASICIAASMwoEdHlwZRgCIAEoDjIWLm1hbnRyYWUudjEuUm91dGVyVHlwZUIIukgFggECEAFIAIgBARJqCgVsaW1pdBgDIAEoA0JWukhTugFQCgtsaW1pdC52YWxpZBIpbGltaXQgbXVzdCBiZSBlaXRoZXIgLTEgb3IgZ3JlYXRlciB0aGFuIDAaFnRoaXMgPT0gLTEgfHwgdGhpcyA+IDBIAYgBARIcCgZvZmZzZXQYBCABKANCB7pIBCICKABIAogBAUIHCgVfdHlwZUIICgZfbGltaXRCCQoHX29mZnNldCJPChNMaXN0Um91dGVyc1Jlc3BvbnNlEiMKB3JvdXRlcnMYASADKAsyEi5tYW50cmFlLnYxLlJvdXRlchITCgt0b3RhbF9jb3VudBgCIAEoAyppCgpSb3V0ZXJUeXBlEhsKF1JPVVRFUl9UWVBFX1VOU1BFQ0lGSUVEEAASFAoQUk9VVEVSX1RZUEVfSFRUUBABEhMKD1JPVVRFUl9UWVBFX1RDUBACEhMKD1JPVVRFUl9UWVBFX1VEUBADMqwDCg1Sb3V0ZXJTZXJ2aWNlEk0KCUdldFJvdXRlchIcLm1hbnRyYWUudjEuR2V0Um91dGVyUmVxdWVzdBodLm1hbnRyYWUudjEuR2V0Um91dGVyUmVzcG9uc2UiA5ACARJRCgxDcmVhdGVSb3V0ZXISHy5tYW50cmFlLnYxLkNyZWF0ZVJvdXRlclJlcXVlc3QaIC5tYW50cmFlLnYxLkNyZWF0ZVJvdXRlclJlc3BvbnNlElEKDFVwZGF0ZVJvdXRlchIfLm1hbnRyYWUudjEuVXBkYXRlUm91dGVyUmVxdWVzdBogLm1hbnRyYWUudjEuVXBkYXRlUm91dGVyUmVzcG9uc2USUQoMRGVsZXRlUm91dGVyEh8ubWFudHJhZS52MS5EZWxldGVSb3V0ZXJSZXF1ZXN0GiAubWFudHJhZS52MS5EZWxldGVSb3V0ZXJSZXNwb25zZRJTCgtMaXN0Um91dGVycxIeLm1hbnRyYWUudjEuTGlzdFJvdXRlcnNSZXF1ZXN0Gh8ubWFudHJhZS52MS5MaXN0Um91dGVyc1Jlc3BvbnNlIgOQAgFCpQEKDmNvbS5tYW50cmFlLnYxQgtSb3V0ZXJQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp]);
|
||||
fileDesc("ChdtYW50cmFlL3YxL3JvdXRlci5wcm90bxIKbWFudHJhZS52MSKIAgoGUm91dGVyEgoKAmlkGAEgASgDEhIKCnByb2ZpbGVfaWQYAiABKAMSEAoIYWdlbnRfaWQYAyABKAkSDAoEbmFtZRgEIAEoCRInCgZjb25maWcYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBiABKAgSJAoEdHlwZRgHIAEoDjIWLm1hbnRyYWUudjEuUm91dGVyVHlwZRIuCgpjcmVhdGVkX2F0GAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRhdGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCJdChBHZXRSb3V0ZXJSZXF1ZXN0EhYKAmlkGAEgASgDQgq6SAfIAQEiAiAAEjEKBHR5cGUYAiABKA4yFi5tYW50cmFlLnYxLlJvdXRlclR5cGVCC7pICMgBAYIBAhABIjcKEUdldFJvdXRlclJlc3BvbnNlEiIKBnJvdXRlchgBIAEoCzISLm1hbnRyYWUudjEuUm91dGVyIs4BChNDcmVhdGVSb3V0ZXJSZXF1ZXN0Eh4KCnByb2ZpbGVfaWQYASABKANCCrpIB8gBASICIAASEAoIYWdlbnRfaWQYAiABKAkSGAoEbmFtZRgDIAEoCUIKukgHyAEBcgIQARInCgZjb25maWcYBCABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBSABKAgSMQoEdHlwZRgGIAEoDjIWLm1hbnRyYWUudjEuUm91dGVyVHlwZUILukgIyAEBggECEAEiOgoUQ3JlYXRlUm91dGVyUmVzcG9uc2USIgoGcm91dGVyGAEgASgLMhIubWFudHJhZS52MS5Sb3V0ZXIitAEKE1VwZGF0ZVJvdXRlclJlcXVlc3QSFgoCaWQYASABKANCCrpIB8gBASICIAASGAoEbmFtZRgCIAEoCUIKukgHyAEBcgIQARInCgZjb25maWcYAyABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBCABKAgSMQoEdHlwZRgFIAEoDjIWLm1hbnRyYWUudjEuUm91dGVyVHlwZUILukgIyAEBggECEAEiOgoUVXBkYXRlUm91dGVyUmVzcG9uc2USIgoGcm91dGVyGAEgASgLMhIubWFudHJhZS52MS5Sb3V0ZXIiYAoTRGVsZXRlUm91dGVyUmVxdWVzdBIWCgJpZBgBIAEoA0IKukgHyAEBIgIgABIxCgR0eXBlGAIgASgOMhYubWFudHJhZS52MS5Sb3V0ZXJUeXBlQgu6SAjIAQGCAQIQASIWChREZWxldGVSb3V0ZXJSZXNwb25zZSK+AgoSTGlzdFJvdXRlcnNSZXF1ZXN0Eh4KCnByb2ZpbGVfaWQYASABKANCCrpIB8gBASICIAASHgoIYWdlbnRfaWQYAiABKAlCB7pIBHICEAFIAIgBARIzCgR0eXBlGAMgASgOMhYubWFudHJhZS52MS5Sb3V0ZXJUeXBlQgi6SAWCAQIQAUgBiAEBEmoKBWxpbWl0GAQgASgDQla6SFO6AVAKC2xpbWl0LnZhbGlkEilsaW1pdCBtdXN0IGJlIGVpdGhlciAtMSBvciBncmVhdGVyIHRoYW4gMBoWdGhpcyA9PSAtMSB8fCB0aGlzID4gMEgCiAEBEhwKBm9mZnNldBgFIAEoA0IHukgEIgIoAEgDiAEBQgsKCV9hZ2VudF9pZEIHCgVfdHlwZUIICgZfbGltaXRCCQoHX29mZnNldCJPChNMaXN0Um91dGVyc1Jlc3BvbnNlEiMKB3JvdXRlcnMYASADKAsyEi5tYW50cmFlLnYxLlJvdXRlchITCgt0b3RhbF9jb3VudBgCIAEoAyppCgpSb3V0ZXJUeXBlEhsKF1JPVVRFUl9UWVBFX1VOU1BFQ0lGSUVEEAASFAoQUk9VVEVSX1RZUEVfSFRUUBABEhMKD1JPVVRFUl9UWVBFX1RDUBACEhMKD1JPVVRFUl9UWVBFX1VEUBADMqwDCg1Sb3V0ZXJTZXJ2aWNlEk0KCUdldFJvdXRlchIcLm1hbnRyYWUudjEuR2V0Um91dGVyUmVxdWVzdBodLm1hbnRyYWUudjEuR2V0Um91dGVyUmVzcG9uc2UiA5ACARJRCgxDcmVhdGVSb3V0ZXISHy5tYW50cmFlLnYxLkNyZWF0ZVJvdXRlclJlcXVlc3QaIC5tYW50cmFlLnYxLkNyZWF0ZVJvdXRlclJlc3BvbnNlElEKDFVwZGF0ZVJvdXRlchIfLm1hbnRyYWUudjEuVXBkYXRlUm91dGVyUmVxdWVzdBogLm1hbnRyYWUudjEuVXBkYXRlUm91dGVyUmVzcG9uc2USUQoMRGVsZXRlUm91dGVyEh8ubWFudHJhZS52MS5EZWxldGVSb3V0ZXJSZXF1ZXN0GiAubWFudHJhZS52MS5EZWxldGVSb3V0ZXJSZXNwb25zZRJTCgtMaXN0Um91dGVycxIeLm1hbnRyYWUudjEuTGlzdFJvdXRlcnNSZXF1ZXN0Gh8ubWFudHJhZS52MS5MaXN0Um91dGVyc1Jlc3BvbnNlIgOQAgFCpQEKDmNvbS5tYW50cmFlLnYxQgtSb3V0ZXJQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.Router
|
||||
@@ -269,17 +269,22 @@ export type ListRoutersRequest = Message<"mantrae.v1.ListRoutersRequest"> & {
|
||||
profileId: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: optional mantrae.v1.RouterType type = 2;
|
||||
* @generated from field: optional string agent_id = 2;
|
||||
*/
|
||||
agentId?: string;
|
||||
|
||||
/**
|
||||
* @generated from field: optional mantrae.v1.RouterType type = 3;
|
||||
*/
|
||||
type?: RouterType;
|
||||
|
||||
/**
|
||||
* @generated from field: optional int64 limit = 3;
|
||||
* @generated from field: optional int64 limit = 4;
|
||||
*/
|
||||
limit?: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: optional int64 offset = 4;
|
||||
* @generated from field: optional int64 offset = 5;
|
||||
*/
|
||||
offset?: bigint;
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ import type { JsonObject, Message } from "@bufbuild/protobuf";
|
||||
* Describes the file mantrae/v1/service.proto.
|
||||
*/
|
||||
export const file_mantrae_v1_service: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChhtYW50cmFlL3YxL3NlcnZpY2UucHJvdG8SCm1hbnRyYWUudjEi+QEKB1NlcnZpY2USCgoCaWQYASABKAMSEgoKcHJvZmlsZV9pZBgCIAEoAxIQCghhZ2VudF9pZBgDIAEoCRIMCgRuYW1lGAQgASgJEicKBmNvbmZpZxgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSJQoEdHlwZRgGIAEoDjIXLm1hbnRyYWUudjEuU2VydmljZVR5cGUSLgoKY3JlYXRlZF9hdBgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiXwoRR2V0U2VydmljZVJlcXVlc3QSFgoCaWQYASABKANCCrpIB8gBASICIAASMgoEdHlwZRgCIAEoDjIXLm1hbnRyYWUudjEuU2VydmljZVR5cGVCC7pICMgBAYIBAhABIjoKEkdldFNlcnZpY2VSZXNwb25zZRIkCgdzZXJ2aWNlGAEgASgLMhMubWFudHJhZS52MS5TZXJ2aWNlIr8BChRDcmVhdGVTZXJ2aWNlUmVxdWVzdBIeCgpwcm9maWxlX2lkGAEgASgDQgq6SAfIAQEiAiAAEhAKCGFnZW50X2lkGAIgASgJEhgKBG5hbWUYAyABKAlCCrpIB8gBAXICEAESJwoGY29uZmlnGAQgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIyCgR0eXBlGAUgASgOMhcubWFudHJhZS52MS5TZXJ2aWNlVHlwZUILukgIyAEBggECEAEiPQoVQ3JlYXRlU2VydmljZVJlc3BvbnNlEiQKB3NlcnZpY2UYASABKAsyEy5tYW50cmFlLnYxLlNlcnZpY2UipQEKFFVwZGF0ZVNlcnZpY2VSZXF1ZXN0EhYKAmlkGAEgASgDQgq6SAfIAQEiAiAAEhgKBG5hbWUYAiABKAlCCrpIB8gBAXICEAESJwoGY29uZmlnGAMgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIyCgR0eXBlGAQgASgOMhcubWFudHJhZS52MS5TZXJ2aWNlVHlwZUILukgIyAEBggECEAEiPQoVVXBkYXRlU2VydmljZVJlc3BvbnNlEiQKB3NlcnZpY2UYASABKAsyEy5tYW50cmFlLnYxLlNlcnZpY2UiYgoURGVsZXRlU2VydmljZVJlcXVlc3QSFgoCaWQYASABKANCCrpIB8gBASICIAASMgoEdHlwZRgCIAEoDjIXLm1hbnRyYWUudjEuU2VydmljZVR5cGVCC7pICMgBAYIBAhABIhcKFURlbGV0ZVNlcnZpY2VSZXNwb25zZSKTAgoTTGlzdFNlcnZpY2VzUmVxdWVzdBIeCgpwcm9maWxlX2lkGAEgASgDQgq6SAfIAQEiAiAAEjQKBHR5cGUYAiABKA4yFy5tYW50cmFlLnYxLlNlcnZpY2VUeXBlQgi6SAWCAQIQAUgAiAEBEmoKBWxpbWl0GAMgASgDQla6SFO6AVAKC2xpbWl0LnZhbGlkEilsaW1pdCBtdXN0IGJlIGVpdGhlciAtMSBvciBncmVhdGVyIHRoYW4gMBoWdGhpcyA9PSAtMSB8fCB0aGlzID4gMEgBiAEBEhwKBm9mZnNldBgEIAEoA0IHukgEIgIoAEgCiAEBQgcKBV90eXBlQggKBl9saW1pdEIJCgdfb2Zmc2V0IlIKFExpc3RTZXJ2aWNlc1Jlc3BvbnNlEiUKCHNlcnZpY2VzGAEgAygLMhMubWFudHJhZS52MS5TZXJ2aWNlEhMKC3RvdGFsX2NvdW50GAIgASgDKm4KC1NlcnZpY2VUeXBlEhwKGFNFUlZJQ0VfVFlQRV9VTlNQRUNJRklFRBAAEhUKEVNFUlZJQ0VfVFlQRV9IVFRQEAESFAoQU0VSVklDRV9UWVBFX1RDUBACEhQKEFNFUlZJQ0VfVFlQRV9VRFAQAzK8AwoOU2VydmljZVNlcnZpY2USUAoKR2V0U2VydmljZRIdLm1hbnRyYWUudjEuR2V0U2VydmljZVJlcXVlc3QaHi5tYW50cmFlLnYxLkdldFNlcnZpY2VSZXNwb25zZSIDkAIBElQKDUNyZWF0ZVNlcnZpY2USIC5tYW50cmFlLnYxLkNyZWF0ZVNlcnZpY2VSZXF1ZXN0GiEubWFudHJhZS52MS5DcmVhdGVTZXJ2aWNlUmVzcG9uc2USVAoNVXBkYXRlU2VydmljZRIgLm1hbnRyYWUudjEuVXBkYXRlU2VydmljZVJlcXVlc3QaIS5tYW50cmFlLnYxLlVwZGF0ZVNlcnZpY2VSZXNwb25zZRJUCg1EZWxldGVTZXJ2aWNlEiAubWFudHJhZS52MS5EZWxldGVTZXJ2aWNlUmVxdWVzdBohLm1hbnRyYWUudjEuRGVsZXRlU2VydmljZVJlc3BvbnNlElYKDExpc3RTZXJ2aWNlcxIfLm1hbnRyYWUudjEuTGlzdFNlcnZpY2VzUmVxdWVzdBogLm1hbnRyYWUudjEuTGlzdFNlcnZpY2VzUmVzcG9uc2UiA5ACAUKmAQoOY29tLm1hbnRyYWUudjFCDFNlcnZpY2VQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp]);
|
||||
fileDesc("ChhtYW50cmFlL3YxL3NlcnZpY2UucHJvdG8SCm1hbnRyYWUudjEi+QEKB1NlcnZpY2USCgoCaWQYASABKAMSEgoKcHJvZmlsZV9pZBgCIAEoAxIQCghhZ2VudF9pZBgDIAEoCRIMCgRuYW1lGAQgASgJEicKBmNvbmZpZxgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSJQoEdHlwZRgGIAEoDjIXLm1hbnRyYWUudjEuU2VydmljZVR5cGUSLgoKY3JlYXRlZF9hdBgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiXwoRR2V0U2VydmljZVJlcXVlc3QSFgoCaWQYASABKANCCrpIB8gBASICIAASMgoEdHlwZRgCIAEoDjIXLm1hbnRyYWUudjEuU2VydmljZVR5cGVCC7pICMgBAYIBAhABIjoKEkdldFNlcnZpY2VSZXNwb25zZRIkCgdzZXJ2aWNlGAEgASgLMhMubWFudHJhZS52MS5TZXJ2aWNlIr8BChRDcmVhdGVTZXJ2aWNlUmVxdWVzdBIeCgpwcm9maWxlX2lkGAEgASgDQgq6SAfIAQEiAiAAEhAKCGFnZW50X2lkGAIgASgJEhgKBG5hbWUYAyABKAlCCrpIB8gBAXICEAESJwoGY29uZmlnGAQgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIyCgR0eXBlGAUgASgOMhcubWFudHJhZS52MS5TZXJ2aWNlVHlwZUILukgIyAEBggECEAEiPQoVQ3JlYXRlU2VydmljZVJlc3BvbnNlEiQKB3NlcnZpY2UYASABKAsyEy5tYW50cmFlLnYxLlNlcnZpY2UipQEKFFVwZGF0ZVNlcnZpY2VSZXF1ZXN0EhYKAmlkGAEgASgDQgq6SAfIAQEiAiAAEhgKBG5hbWUYAiABKAlCCrpIB8gBAXICEAESJwoGY29uZmlnGAMgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIyCgR0eXBlGAQgASgOMhcubWFudHJhZS52MS5TZXJ2aWNlVHlwZUILukgIyAEBggECEAEiPQoVVXBkYXRlU2VydmljZVJlc3BvbnNlEiQKB3NlcnZpY2UYASABKAsyEy5tYW50cmFlLnYxLlNlcnZpY2UiYgoURGVsZXRlU2VydmljZVJlcXVlc3QSFgoCaWQYASABKANCCrpIB8gBASICIAASMgoEdHlwZRgCIAEoDjIXLm1hbnRyYWUudjEuU2VydmljZVR5cGVCC7pICMgBAYIBAhABIhcKFURlbGV0ZVNlcnZpY2VSZXNwb25zZSLAAgoTTGlzdFNlcnZpY2VzUmVxdWVzdBIeCgpwcm9maWxlX2lkGAEgASgDQgq6SAfIAQEiAiAAEh4KCGFnZW50X2lkGAIgASgJQge6SARyAhABSACIAQESNAoEdHlwZRgDIAEoDjIXLm1hbnRyYWUudjEuU2VydmljZVR5cGVCCLpIBYIBAhABSAGIAQESagoFbGltaXQYBCABKANCVrpIU7oBUAoLbGltaXQudmFsaWQSKWxpbWl0IG11c3QgYmUgZWl0aGVyIC0xIG9yIGdyZWF0ZXIgdGhhbiAwGhZ0aGlzID09IC0xIHx8IHRoaXMgPiAwSAKIAQESHAoGb2Zmc2V0GAUgASgDQge6SAQiAigASAOIAQFCCwoJX2FnZW50X2lkQgcKBV90eXBlQggKBl9saW1pdEIJCgdfb2Zmc2V0IlIKFExpc3RTZXJ2aWNlc1Jlc3BvbnNlEiUKCHNlcnZpY2VzGAEgAygLMhMubWFudHJhZS52MS5TZXJ2aWNlEhMKC3RvdGFsX2NvdW50GAIgASgDKm4KC1NlcnZpY2VUeXBlEhwKGFNFUlZJQ0VfVFlQRV9VTlNQRUNJRklFRBAAEhUKEVNFUlZJQ0VfVFlQRV9IVFRQEAESFAoQU0VSVklDRV9UWVBFX1RDUBACEhQKEFNFUlZJQ0VfVFlQRV9VRFAQAzK8AwoOU2VydmljZVNlcnZpY2USUAoKR2V0U2VydmljZRIdLm1hbnRyYWUudjEuR2V0U2VydmljZVJlcXVlc3QaHi5tYW50cmFlLnYxLkdldFNlcnZpY2VSZXNwb25zZSIDkAIBElQKDUNyZWF0ZVNlcnZpY2USIC5tYW50cmFlLnYxLkNyZWF0ZVNlcnZpY2VSZXF1ZXN0GiEubWFudHJhZS52MS5DcmVhdGVTZXJ2aWNlUmVzcG9uc2USVAoNVXBkYXRlU2VydmljZRIgLm1hbnRyYWUudjEuVXBkYXRlU2VydmljZVJlcXVlc3QaIS5tYW50cmFlLnYxLlVwZGF0ZVNlcnZpY2VSZXNwb25zZRJUCg1EZWxldGVTZXJ2aWNlEiAubWFudHJhZS52MS5EZWxldGVTZXJ2aWNlUmVxdWVzdBohLm1hbnRyYWUudjEuRGVsZXRlU2VydmljZVJlc3BvbnNlElYKDExpc3RTZXJ2aWNlcxIfLm1hbnRyYWUudjEuTGlzdFNlcnZpY2VzUmVxdWVzdBogLm1hbnRyYWUudjEuTGlzdFNlcnZpY2VzUmVzcG9uc2UiA5ACAUKmAQoOY29tLm1hbnRyYWUudjFCDFNlcnZpY2VQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.Service
|
||||
@@ -254,17 +254,22 @@ export type ListServicesRequest = Message<"mantrae.v1.ListServicesRequest"> & {
|
||||
profileId: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: optional mantrae.v1.ServiceType type = 2;
|
||||
* @generated from field: optional string agent_id = 2;
|
||||
*/
|
||||
agentId?: string;
|
||||
|
||||
/**
|
||||
* @generated from field: optional mantrae.v1.ServiceType type = 3;
|
||||
*/
|
||||
type?: ServiceType;
|
||||
|
||||
/**
|
||||
* @generated from field: optional int64 limit = 3;
|
||||
* @generated from field: optional int64 limit = 4;
|
||||
*/
|
||||
limit?: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: optional int64 offset = 4;
|
||||
* @generated from field: optional int64 offset = 5;
|
||||
*/
|
||||
offset?: bigint;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user