mirror of
https://github.com/MizuchiLabs/mantrae.git
synced 2025-12-16 20:05:17 -06:00
oof
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -10,8 +10,6 @@
|
||||
*.dylib
|
||||
/bin
|
||||
/builds
|
||||
mantrae
|
||||
mantrae-agent
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
|
||||
"connectrpc.com/connect"
|
||||
"github.com/mizuchilabs/mantrae/pkg/meta"
|
||||
agentv1 "github.com/mizuchilabs/mantrae/proto/gen/agent/v1"
|
||||
"github.com/mizuchilabs/mantrae/proto/gen/agent/v1/agentv1connect"
|
||||
mantraev1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
"github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1/mantraev1connect"
|
||||
)
|
||||
|
||||
const tokenFile = "data/.mantrae-token"
|
||||
|
||||
type TokenSource struct {
|
||||
mu sync.Mutex
|
||||
client agentv1connect.AgentServiceClient
|
||||
client mantraev1connect.AgentServiceClient
|
||||
token string
|
||||
fallback bool
|
||||
}
|
||||
@@ -75,7 +75,7 @@ func (ts *TokenSource) SetClient() error {
|
||||
return err
|
||||
}
|
||||
|
||||
ts.client = agentv1connect.NewAgentServiceClient(
|
||||
ts.client = mantraev1connect.NewAgentServiceClient(
|
||||
http.DefaultClient,
|
||||
claims.ServerURL,
|
||||
connect.WithInterceptors(ts.Interceptor()),
|
||||
@@ -91,7 +91,7 @@ func (ts *TokenSource) Refresh(ctx context.Context) error {
|
||||
return errors.New("no client")
|
||||
}
|
||||
|
||||
req := connect.NewRequest(&agentv1.HealthCheckRequest{})
|
||||
req := connect.NewRequest(&mantraev1.HealthCheckRequest{})
|
||||
req.Header().Set("Authorization", "Bearer "+ts.token)
|
||||
if claims, err := DecodeJWT(ts.token); err == nil {
|
||||
req.Header().Set(meta.HeaderAgentID, claims.AgentID)
|
||||
@@ -158,7 +158,7 @@ func (ts *TokenSource) GetToken() string {
|
||||
return ts.token
|
||||
}
|
||||
|
||||
func (ts *TokenSource) GetClient() agentv1connect.AgentServiceClient {
|
||||
func (ts *TokenSource) GetClient() mantraev1connect.AgentServiceClient {
|
||||
ts.mu.Lock()
|
||||
defer ts.mu.Unlock()
|
||||
return ts.client
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
"time"
|
||||
|
||||
"connectrpc.com/connect"
|
||||
agentv1 "github.com/mizuchilabs/mantrae/proto/gen/agent/v1"
|
||||
"github.com/mizuchilabs/mantrae/proto/gen/agent/v1/agentv1connect"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/client"
|
||||
mantraev1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
"github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1/mantraev1connect"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
@@ -54,7 +54,7 @@ func Client(quit chan os.Signal) {
|
||||
|
||||
// doContainer invokes GetContainer using current token/claims
|
||||
func doContainer(
|
||||
client agentv1connect.AgentServiceClient,
|
||||
client mantraev1connect.AgentServiceClient,
|
||||
quit chan os.Signal,
|
||||
) {
|
||||
// build payload
|
||||
@@ -80,8 +80,8 @@ func doContainer(
|
||||
}
|
||||
|
||||
// sendContainer creates a GetContainerRequest with information about the local machine
|
||||
func sendContainerRequest() *connect.Request[agentv1.GetContainerRequest] {
|
||||
var request agentv1.GetContainerRequest
|
||||
func sendContainerRequest() *connect.Request[mantraev1.GetContainerRequest] {
|
||||
var request mantraev1.GetContainerRequest
|
||||
|
||||
// Get hostname
|
||||
hostname, err := os.Hostname()
|
||||
@@ -108,7 +108,7 @@ func sendContainerRequest() *connect.Request[agentv1.GetContainerRequest] {
|
||||
}
|
||||
|
||||
// getContainers retrieves all containers and their info on the local machine
|
||||
func getContainers() ([]*agentv1.Container, error) {
|
||||
func getContainers() ([]*mantraev1.Container, error) {
|
||||
// Create a new Docker client
|
||||
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||
if err != nil {
|
||||
@@ -121,7 +121,7 @@ func getContainers() ([]*agentv1.Container, error) {
|
||||
return nil, errors.New("failed to list containers")
|
||||
}
|
||||
|
||||
var result []*agentv1.Container
|
||||
var result []*mantraev1.Container
|
||||
portMap := make(map[int32]int32)
|
||||
|
||||
// Iterate over each container and populate the Container struct
|
||||
@@ -180,7 +180,7 @@ func getContainers() ([]*agentv1.Container, error) {
|
||||
}
|
||||
|
||||
// Populate the Container struct
|
||||
container := &agentv1.Container{
|
||||
container := &mantraev1.Container{
|
||||
Id: c.ID,
|
||||
Name: c.Names[0], // Take the first name if multiple exist
|
||||
Labels: containerJSON.Config.Labels,
|
||||
|
||||
13
buf.gen.yaml
13
buf.gen.yaml
@@ -1,5 +1,4 @@
|
||||
version: v2
|
||||
clean: true
|
||||
managed:
|
||||
enabled: true
|
||||
override:
|
||||
@@ -12,5 +11,17 @@ plugins:
|
||||
- local: protoc-gen-connect-go
|
||||
out: proto/gen
|
||||
opt: paths=source_relative
|
||||
- local: protoc-gen-es
|
||||
out: web/src/lib/gen
|
||||
opt: target=ts
|
||||
include_imports: true
|
||||
- local: protoc-gen-connect-openapi
|
||||
out: proto/gen/openapi
|
||||
strategy: all
|
||||
opt:
|
||||
- allow-get
|
||||
- with-streaming
|
||||
- path=openapi.yaml
|
||||
- base=proto/gen/openapi/base.yaml
|
||||
inputs:
|
||||
- directory: proto
|
||||
|
||||
@@ -46,12 +46,7 @@ func Login(a *config.App) http.HandlerFunc {
|
||||
http.Error(w, "User not found", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
userPassword, err := q.GetUserPassword(r.Context(), user.ID)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if err = bcrypt.CompareHashAndPassword([]byte(userPassword), []byte(request.Password)); err != nil {
|
||||
if err = bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(request.Password)); err != nil {
|
||||
http.Error(w, "Invalid username or password.", http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package middlewares
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -11,14 +12,16 @@ import (
|
||||
"github.com/mizuchilabs/mantrae/internal/db"
|
||||
"github.com/mizuchilabs/mantrae/internal/util"
|
||||
"github.com/mizuchilabs/mantrae/pkg/meta"
|
||||
"github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1/mantraev1connect"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
type ctxKey string
|
||||
|
||||
const (
|
||||
AuthUserKey ctxKey = "user"
|
||||
AuthAgentKey ctxKey = "agent"
|
||||
AuthUserIDKey ctxKey = "user_id"
|
||||
AuthUserKey ctxKey = "user"
|
||||
AuthAgentKey ctxKey = "agent"
|
||||
)
|
||||
|
||||
// BasicAuth middleware for simple authentication
|
||||
@@ -39,14 +42,7 @@ func (h *MiddlewareHandler) BasicAuth(next http.Handler) http.Handler {
|
||||
return
|
||||
}
|
||||
|
||||
userPassword, err := q.GetUserPassword(r.Context(), user.ID)
|
||||
if err != nil {
|
||||
w.Header().Set("WWW-Authenticate", `Basic realm="Restricted"`)
|
||||
http.Error(w, "Unauthorized", http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
if err := bcrypt.CompareHashAndPassword([]byte(userPassword), []byte(password)); err != nil {
|
||||
if err := bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(password)); err != nil {
|
||||
w.Header().Set("WWW-Authenticate", `Basic realm="Restricted"`)
|
||||
http.Error(w, "Unauthorized", http.StatusUnauthorized)
|
||||
return
|
||||
@@ -97,6 +93,67 @@ func (h *MiddlewareHandler) JWT(next http.Handler) http.Handler {
|
||||
})
|
||||
}
|
||||
|
||||
func Authentication(app *config.App) connect.UnaryInterceptorFunc {
|
||||
return connect.UnaryInterceptorFunc(func(next connect.UnaryFunc) connect.UnaryFunc {
|
||||
return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) {
|
||||
// Skip authentication for certain endpoints (like login)
|
||||
if isPublicEndpoint(req.Spec().Procedure) {
|
||||
return next(ctx, req)
|
||||
}
|
||||
|
||||
authHeader := req.Header().Get("Authorization")
|
||||
if authHeader == "" {
|
||||
return nil, connect.NewError(
|
||||
connect.CodeUnauthenticated,
|
||||
fmt.Errorf("missing authorization header"),
|
||||
)
|
||||
}
|
||||
|
||||
tokenString := strings.TrimPrefix(authHeader, "Bearer ")
|
||||
if tokenString == authHeader {
|
||||
return nil, connect.NewError(
|
||||
connect.CodeUnauthenticated,
|
||||
fmt.Errorf("invalid authorization header"),
|
||||
)
|
||||
}
|
||||
|
||||
// Check if it's an agent request
|
||||
agentID := req.Header().Get(meta.HeaderAgentID)
|
||||
if agentID != "" {
|
||||
agent, err := app.Conn.GetQuery().GetAgent(ctx, agentID)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(
|
||||
connect.CodeNotFound,
|
||||
errors.New("agent not found"),
|
||||
)
|
||||
}
|
||||
if agent.Token != tokenString {
|
||||
return nil, connect.NewError(
|
||||
connect.CodeUnauthenticated,
|
||||
errors.New("token mismatch"),
|
||||
)
|
||||
}
|
||||
ctx = context.WithValue(ctx, AuthAgentKey, &agent)
|
||||
return next(ctx, req)
|
||||
}
|
||||
|
||||
// Parse and validate the token
|
||||
claims, err := util.DecodeUserJWT(tokenString, app.Config.Secret)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(
|
||||
connect.CodeUnauthenticated,
|
||||
fmt.Errorf("invalid token: %w", err),
|
||||
)
|
||||
}
|
||||
|
||||
// Add claims to context
|
||||
ctx = context.WithValue(ctx, AuthUserIDKey, claims.ID)
|
||||
|
||||
return next(ctx, req)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (h *MiddlewareHandler) AdminOnly(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
// Get the username from the request context
|
||||
@@ -163,3 +220,18 @@ func AgentAuth(app *config.App) connect.UnaryInterceptorFunc {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func isPublicEndpoint(procedure string) bool {
|
||||
publicEndpoints := map[string]bool{
|
||||
mantraev1connect.UserServiceLoginUserProcedure: true,
|
||||
mantraev1connect.UserServiceVerifyOTPProcedure: true,
|
||||
mantraev1connect.UserServiceSendOTPProcedure: true,
|
||||
}
|
||||
return publicEndpoints[procedure]
|
||||
}
|
||||
|
||||
// Helper functions to get auth info from context
|
||||
func GetUserIDFromContext(ctx context.Context) (int64, bool) {
|
||||
id, ok := ctx.Value(AuthUserIDKey).(int64)
|
||||
return id, ok
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"github.com/mizuchilabs/mantrae/internal/api/service"
|
||||
"github.com/mizuchilabs/mantrae/internal/config"
|
||||
"github.com/mizuchilabs/mantrae/internal/util"
|
||||
"github.com/mizuchilabs/mantrae/proto/gen/agent/v1/agentv1connect"
|
||||
"github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1/mantraev1connect"
|
||||
"github.com/mizuchilabs/mantrae/web"
|
||||
)
|
||||
|
||||
@@ -113,7 +113,10 @@ func (s *Server) registerServices() {
|
||||
// Common interceptors
|
||||
opts := []connect.HandlerOption{
|
||||
connect.WithCompressMinBytes(1024),
|
||||
connect.WithInterceptors(middlewares.Logging()),
|
||||
connect.WithInterceptors(
|
||||
middlewares.Authentication(s.app),
|
||||
middlewares.Logging(),
|
||||
),
|
||||
connect.WithRecover(
|
||||
func(ctx context.Context, spec connect.Spec, header http.Header, panic any) error {
|
||||
// Log the panic with context
|
||||
@@ -138,7 +141,13 @@ func (s *Server) registerServices() {
|
||||
// Routes
|
||||
s.routes()
|
||||
|
||||
serviceNames := []string{agentv1connect.AgentServiceName}
|
||||
serviceNames := []string{
|
||||
mantraev1connect.ProfileServiceName,
|
||||
mantraev1connect.UserServiceName,
|
||||
mantraev1connect.EntryPointServiceName,
|
||||
mantraev1connect.SettingServiceName,
|
||||
mantraev1connect.AgentServiceName,
|
||||
}
|
||||
|
||||
checker := grpchealth.NewStaticChecker(serviceNames...)
|
||||
reflector := grpcreflect.NewStaticReflector(serviceNames...)
|
||||
@@ -148,8 +157,24 @@ func (s *Server) registerServices() {
|
||||
s.mux.Handle(grpcreflect.NewHandlerV1Alpha(reflector))
|
||||
|
||||
// Service implementations
|
||||
agentOpts := append(opts, connect.WithInterceptors(middlewares.AgentAuth(s.app)))
|
||||
s.mux.Handle(
|
||||
agentv1connect.NewAgentServiceHandler(service.NewAgentService(s.app), agentOpts...),
|
||||
)
|
||||
s.mux.Handle(mantraev1connect.NewProfileServiceHandler(
|
||||
service.NewProfileService(s.app),
|
||||
opts...,
|
||||
))
|
||||
s.mux.Handle(mantraev1connect.NewUserServiceHandler(
|
||||
service.NewUserService(s.app),
|
||||
opts...,
|
||||
))
|
||||
s.mux.Handle(mantraev1connect.NewEntryPointServiceHandler(
|
||||
service.NewEntryPointService(s.app),
|
||||
opts...,
|
||||
))
|
||||
s.mux.Handle(mantraev1connect.NewSettingServiceHandler(
|
||||
service.NewSettingService(s.app),
|
||||
opts...,
|
||||
))
|
||||
s.mux.Handle(mantraev1connect.NewAgentServiceHandler(
|
||||
service.NewAgentService(s.app),
|
||||
opts...,
|
||||
))
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/mizuchilabs/mantrae/internal/traefik"
|
||||
"github.com/mizuchilabs/mantrae/internal/util"
|
||||
"github.com/mizuchilabs/mantrae/pkg/meta"
|
||||
agentv1 "github.com/mizuchilabs/mantrae/proto/gen/agent/v1"
|
||||
mantraev1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
)
|
||||
|
||||
type AgentService struct {
|
||||
@@ -29,8 +29,8 @@ func NewAgentService(app *config.App) *AgentService {
|
||||
|
||||
func (s *AgentService) HealthCheck(
|
||||
ctx context.Context,
|
||||
req *connect.Request[agentv1.HealthCheckRequest],
|
||||
) (*connect.Response[agentv1.HealthCheckResponse], error) {
|
||||
req *connect.Request[mantraev1.HealthCheckRequest],
|
||||
) (*connect.Response[mantraev1.HealthCheckResponse], error) {
|
||||
// Rotate Token
|
||||
token, err := s.updateToken(ctx, req.Header().Get(meta.HeaderAgentID))
|
||||
if err != nil {
|
||||
@@ -40,13 +40,13 @@ func (s *AgentService) HealthCheck(
|
||||
Type: util.EventTypeUpdate,
|
||||
Category: util.EventCategoryAgent,
|
||||
}
|
||||
return connect.NewResponse(&agentv1.HealthCheckResponse{Ok: true, Token: *token}), nil
|
||||
return connect.NewResponse(&mantraev1.HealthCheckResponse{Ok: true, Token: *token}), nil
|
||||
}
|
||||
|
||||
func (s *AgentService) GetContainer(
|
||||
ctx context.Context,
|
||||
req *connect.Request[agentv1.GetContainerRequest],
|
||||
) (*connect.Response[agentv1.GetContainerResponse], error) {
|
||||
req *connect.Request[mantraev1.GetContainerRequest],
|
||||
) (*connect.Response[mantraev1.GetContainerResponse], error) {
|
||||
agent := middlewares.GetAgentContext(ctx)
|
||||
if agent == nil {
|
||||
return nil, connect.NewError(
|
||||
@@ -98,7 +98,7 @@ func (s *AgentService) GetContainer(
|
||||
Type: util.EventTypeUpdate,
|
||||
Category: util.EventCategoryAgent,
|
||||
}
|
||||
return connect.NewResponse(&agentv1.GetContainerResponse{}), nil
|
||||
return connect.NewResponse(&mantraev1.GetContainerResponse{}), nil
|
||||
}
|
||||
|
||||
func (s *AgentService) updateToken(ctx context.Context, id string) (*string, error) {
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"time"
|
||||
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"google.golang.org/protobuf/types/known/wrapperspb"
|
||||
)
|
||||
|
||||
func SafeString(s *string) string {
|
||||
@@ -35,13 +34,6 @@ func SafeFloat(f *float64) float64 {
|
||||
return *f
|
||||
}
|
||||
|
||||
func SafeBool(b *bool) *wrapperspb.BoolValue {
|
||||
if b == nil {
|
||||
return wrapperspb.Bool(false)
|
||||
}
|
||||
return wrapperspb.Bool(*b)
|
||||
}
|
||||
|
||||
func SafeTimestamp(t *time.Time) *timestamppb.Timestamp {
|
||||
if t == nil {
|
||||
return nil
|
||||
|
||||
143
internal/api/service/entrypoint.go
Normal file
143
internal/api/service/entrypoint.go
Normal file
@@ -0,0 +1,143 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"connectrpc.com/connect"
|
||||
|
||||
"github.com/mizuchilabs/mantrae/internal/config"
|
||||
"github.com/mizuchilabs/mantrae/internal/db"
|
||||
mantraev1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
)
|
||||
|
||||
type EntryPointService struct {
|
||||
app *config.App
|
||||
}
|
||||
|
||||
func NewEntryPointService(app *config.App) *EntryPointService {
|
||||
return &EntryPointService{app: app}
|
||||
}
|
||||
|
||||
func (s *EntryPointService) GetEntryPoint(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.GetEntryPointRequest],
|
||||
) (*connect.Response[mantraev1.GetEntryPointResponse], error) {
|
||||
entryPoint, err := s.app.Conn.GetQuery().GetEntryPoint(ctx, req.Msg.Id)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.GetEntryPointResponse{
|
||||
EntryPoint: &mantraev1.EntryPoint{
|
||||
Id: entryPoint.ID,
|
||||
Name: entryPoint.Name,
|
||||
Address: entryPoint.Address,
|
||||
IsDefault: entryPoint.IsDefault,
|
||||
CreatedAt: SafeTimestamp(entryPoint.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(entryPoint.UpdatedAt),
|
||||
},
|
||||
}), nil
|
||||
}
|
||||
|
||||
func (s *EntryPointService) CreateEntryPoint(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.CreateEntryPointRequest],
|
||||
) (*connect.Response[mantraev1.CreateEntryPointResponse], error) {
|
||||
params := db.CreateEntryPointParams{
|
||||
Name: req.Msg.Name,
|
||||
Address: req.Msg.Address,
|
||||
IsDefault: req.Msg.IsDefault,
|
||||
}
|
||||
entryPoint, err := s.app.Conn.GetQuery().CreateEntryPoint(ctx, params)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.CreateEntryPointResponse{
|
||||
EntryPoint: &mantraev1.EntryPoint{
|
||||
Id: entryPoint.ID,
|
||||
Name: entryPoint.Name,
|
||||
Address: entryPoint.Address,
|
||||
IsDefault: entryPoint.IsDefault,
|
||||
CreatedAt: SafeTimestamp(entryPoint.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(entryPoint.UpdatedAt),
|
||||
},
|
||||
}), nil
|
||||
}
|
||||
|
||||
func (s *EntryPointService) UpdateEntryPoint(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.UpdateEntryPointRequest],
|
||||
) (*connect.Response[mantraev1.UpdateEntryPointResponse], error) {
|
||||
params := db.UpdateEntryPointParams{
|
||||
ID: req.Msg.Id,
|
||||
Name: req.Msg.Name,
|
||||
Address: req.Msg.Address,
|
||||
IsDefault: req.Msg.IsDefault,
|
||||
}
|
||||
entryPoint, err := s.app.Conn.GetQuery().UpdateEntryPoint(ctx, params)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.UpdateEntryPointResponse{
|
||||
EntryPoint: &mantraev1.EntryPoint{
|
||||
Id: entryPoint.ID,
|
||||
Name: entryPoint.Name,
|
||||
Address: entryPoint.Address,
|
||||
IsDefault: entryPoint.IsDefault,
|
||||
CreatedAt: SafeTimestamp(entryPoint.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(entryPoint.UpdatedAt),
|
||||
},
|
||||
}), nil
|
||||
}
|
||||
|
||||
func (s *EntryPointService) DeleteEntryPoint(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.DeleteEntryPointRequest],
|
||||
) (*connect.Response[mantraev1.DeleteEntryPointResponse], error) {
|
||||
err := s.app.Conn.GetQuery().DeleteEntryPoint(ctx, req.Msg.Id)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.DeleteEntryPointResponse{}), nil
|
||||
}
|
||||
|
||||
func (s *EntryPointService) ListEntryPoints(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.ListEntryPointsRequest],
|
||||
) (*connect.Response[mantraev1.ListEntryPointsResponse], error) {
|
||||
var params db.ListEntryPointsParams
|
||||
if req.Msg.Limit == nil {
|
||||
params.Limit = 100
|
||||
} else {
|
||||
params.Limit = *req.Msg.Limit
|
||||
}
|
||||
if req.Msg.Offset == nil {
|
||||
params.Offset = 0
|
||||
} else {
|
||||
params.Offset = *req.Msg.Offset
|
||||
}
|
||||
|
||||
dbEntryPoints, err := s.app.Conn.GetQuery().ListEntryPoints(ctx, params)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
totalCount, err := s.app.Conn.GetQuery().CountEntryPoints(ctx)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
var entryPoints []*mantraev1.EntryPoint
|
||||
for _, entryPoint := range dbEntryPoints {
|
||||
entryPoints = append(entryPoints, &mantraev1.EntryPoint{
|
||||
Id: entryPoint.ID,
|
||||
Name: entryPoint.Name,
|
||||
Address: entryPoint.Address,
|
||||
IsDefault: entryPoint.IsDefault,
|
||||
CreatedAt: SafeTimestamp(entryPoint.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(entryPoint.UpdatedAt),
|
||||
})
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.ListEntryPointsResponse{
|
||||
EntryPoints: entryPoints,
|
||||
TotalCount: totalCount,
|
||||
}), nil
|
||||
}
|
||||
@@ -5,10 +5,9 @@ import (
|
||||
|
||||
"connectrpc.com/connect"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/mizuchilabs/mantrae/internal/config"
|
||||
"github.com/mizuchilabs/mantrae/internal/db"
|
||||
profilev1 "github.com/mizuchilabs/mantrae/proto/gen/server/v1"
|
||||
mantraev1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
)
|
||||
|
||||
type ProfileService struct {
|
||||
@@ -21,14 +20,14 @@ func NewProfileService(app *config.App) *ProfileService {
|
||||
|
||||
func (s *ProfileService) GetProfile(
|
||||
ctx context.Context,
|
||||
req *connect.Request[profilev1.GetProfileRequest],
|
||||
) (*connect.Response[profilev1.GetProfileResponse], error) {
|
||||
req *connect.Request[mantraev1.GetProfileRequest],
|
||||
) (*connect.Response[mantraev1.GetProfileResponse], error) {
|
||||
profile, err := s.app.Conn.GetQuery().GetProfile(ctx, req.Msg.Id)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&profilev1.GetProfileResponse{
|
||||
Profile: &profilev1.Profile{
|
||||
return connect.NewResponse(&mantraev1.GetProfileResponse{
|
||||
Profile: &mantraev1.Profile{
|
||||
Id: profile.ID,
|
||||
Name: profile.Name,
|
||||
Description: SafeString(profile.Description),
|
||||
@@ -40,15 +39,9 @@ func (s *ProfileService) GetProfile(
|
||||
|
||||
func (s *ProfileService) CreateProfile(
|
||||
ctx context.Context,
|
||||
req *connect.Request[profilev1.CreateProfileRequest],
|
||||
) (*connect.Response[profilev1.CreateProfileResponse], error) {
|
||||
id, err := uuid.NewV7()
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
req *connect.Request[mantraev1.CreateProfileRequest],
|
||||
) (*connect.Response[mantraev1.CreateProfileResponse], error) {
|
||||
params := db.CreateProfileParams{
|
||||
ID: id.String(),
|
||||
Name: req.Msg.Name,
|
||||
}
|
||||
if req.Msg.Description != nil {
|
||||
@@ -59,8 +52,8 @@ func (s *ProfileService) CreateProfile(
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&profilev1.CreateProfileResponse{
|
||||
Profile: &profilev1.Profile{
|
||||
return connect.NewResponse(&mantraev1.CreateProfileResponse{
|
||||
Profile: &mantraev1.Profile{
|
||||
Id: profile.ID,
|
||||
Name: profile.Name,
|
||||
Description: SafeString(profile.Description),
|
||||
@@ -72,8 +65,8 @@ func (s *ProfileService) CreateProfile(
|
||||
|
||||
func (s *ProfileService) UpdateProfile(
|
||||
ctx context.Context,
|
||||
req *connect.Request[profilev1.UpdateProfileRequest],
|
||||
) (*connect.Response[profilev1.UpdateProfileResponse], error) {
|
||||
req *connect.Request[mantraev1.UpdateProfileRequest],
|
||||
) (*connect.Response[mantraev1.UpdateProfileResponse], error) {
|
||||
params := db.UpdateProfileParams{
|
||||
ID: req.Msg.Id,
|
||||
Name: req.Msg.Name,
|
||||
@@ -86,8 +79,8 @@ func (s *ProfileService) UpdateProfile(
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&profilev1.UpdateProfileResponse{
|
||||
Profile: &profilev1.Profile{
|
||||
return connect.NewResponse(&mantraev1.UpdateProfileResponse{
|
||||
Profile: &mantraev1.Profile{
|
||||
Id: profile.ID,
|
||||
Name: profile.Name,
|
||||
Description: SafeString(profile.Description),
|
||||
@@ -99,19 +92,19 @@ func (s *ProfileService) UpdateProfile(
|
||||
|
||||
func (s *ProfileService) DeleteProfile(
|
||||
ctx context.Context,
|
||||
req *connect.Request[profilev1.DeleteProfileRequest],
|
||||
) (*connect.Response[profilev1.DeleteProfileResponse], error) {
|
||||
req *connect.Request[mantraev1.DeleteProfileRequest],
|
||||
) (*connect.Response[mantraev1.DeleteProfileResponse], error) {
|
||||
err := s.app.Conn.GetQuery().DeleteProfile(ctx, req.Msg.Id)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&profilev1.DeleteProfileResponse{}), nil
|
||||
return connect.NewResponse(&mantraev1.DeleteProfileResponse{}), nil
|
||||
}
|
||||
|
||||
func (s *ProfileService) ListProfiles(
|
||||
ctx context.Context,
|
||||
req *connect.Request[profilev1.ListProfilesRequest],
|
||||
) (*connect.Response[profilev1.ListProfilesResponse], error) {
|
||||
req *connect.Request[mantraev1.ListProfilesRequest],
|
||||
) (*connect.Response[mantraev1.ListProfilesResponse], error) {
|
||||
var params db.ListProfilesParams
|
||||
if req.Msg.Limit == nil {
|
||||
params.Limit = 100
|
||||
@@ -133,9 +126,9 @@ func (s *ProfileService) ListProfiles(
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
var profiles []*profilev1.Profile
|
||||
var profiles []*mantraev1.Profile
|
||||
for _, profile := range dbProfiles {
|
||||
profiles = append(profiles, &profilev1.Profile{
|
||||
profiles = append(profiles, &mantraev1.Profile{
|
||||
Id: profile.ID,
|
||||
Name: profile.Name,
|
||||
Description: SafeString(profile.Description),
|
||||
@@ -143,7 +136,7 @@ func (s *ProfileService) ListProfiles(
|
||||
UpdatedAt: SafeTimestamp(profile.UpdatedAt),
|
||||
})
|
||||
}
|
||||
return connect.NewResponse(&profilev1.ListProfilesResponse{
|
||||
return connect.NewResponse(&mantraev1.ListProfilesResponse{
|
||||
Profiles: profiles,
|
||||
TotalCount: totalCount,
|
||||
}), nil
|
||||
|
||||
82
internal/api/service/setting.go
Normal file
82
internal/api/service/setting.go
Normal file
@@ -0,0 +1,82 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"connectrpc.com/connect"
|
||||
|
||||
"github.com/mizuchilabs/mantrae/internal/config"
|
||||
"github.com/mizuchilabs/mantrae/internal/db"
|
||||
mantraev1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
)
|
||||
|
||||
type SettingService struct {
|
||||
app *config.App
|
||||
}
|
||||
|
||||
func NewSettingService(app *config.App) *SettingService {
|
||||
return &SettingService{app: app}
|
||||
}
|
||||
|
||||
func (s *SettingService) GetSetting(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.GetSettingRequest],
|
||||
) (*connect.Response[mantraev1.GetSettingResponse], error) {
|
||||
setting, err := s.app.Conn.GetQuery().GetSetting(ctx, req.Msg.Key)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.GetSettingResponse{
|
||||
Setting: &mantraev1.Setting{
|
||||
Key: setting.Key,
|
||||
Value: setting.Value,
|
||||
Description: SafeString(setting.Description),
|
||||
UpdatedAt: SafeTimestamp(setting.UpdatedAt),
|
||||
},
|
||||
}), nil
|
||||
}
|
||||
|
||||
func (s *SettingService) UpdateSetting(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.UpdateSettingRequest],
|
||||
) (*connect.Response[mantraev1.UpdateSettingResponse], error) {
|
||||
params := db.UpdateSettingParams{
|
||||
Key: req.Msg.Key,
|
||||
Value: req.Msg.Value,
|
||||
}
|
||||
setting, err := s.app.Conn.GetQuery().UpdateSetting(ctx, params)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.UpdateSettingResponse{
|
||||
Setting: &mantraev1.Setting{
|
||||
Key: setting.Key,
|
||||
Value: setting.Value,
|
||||
Description: SafeString(setting.Description),
|
||||
UpdatedAt: SafeTimestamp(setting.UpdatedAt),
|
||||
},
|
||||
}), nil
|
||||
}
|
||||
|
||||
func (s *SettingService) ListSettings(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.ListSettingsRequest],
|
||||
) (*connect.Response[mantraev1.ListSettingsResponse], error) {
|
||||
dbSettings, err := s.app.Conn.GetQuery().ListSettings(ctx)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
var settings []*mantraev1.Setting
|
||||
for _, setting := range dbSettings {
|
||||
settings = append(settings, &mantraev1.Setting{
|
||||
Key: setting.Key,
|
||||
Value: setting.Value,
|
||||
Description: SafeString(setting.Description),
|
||||
UpdatedAt: SafeTimestamp(setting.UpdatedAt),
|
||||
})
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.ListSettingsResponse{
|
||||
Settings: settings,
|
||||
}), nil
|
||||
}
|
||||
332
internal/api/service/user.go
Normal file
332
internal/api/service/user.go
Normal file
@@ -0,0 +1,332 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"connectrpc.com/connect"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"github.com/mizuchilabs/mantrae/internal/api/middlewares"
|
||||
"github.com/mizuchilabs/mantrae/internal/config"
|
||||
"github.com/mizuchilabs/mantrae/internal/db"
|
||||
"github.com/mizuchilabs/mantrae/internal/mail"
|
||||
"github.com/mizuchilabs/mantrae/internal/settings"
|
||||
"github.com/mizuchilabs/mantrae/internal/util"
|
||||
mantraev1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
)
|
||||
|
||||
type UserService struct {
|
||||
app *config.App
|
||||
}
|
||||
|
||||
func NewUserService(app *config.App) *UserService {
|
||||
return &UserService{app: app}
|
||||
}
|
||||
|
||||
func (s *UserService) LoginUser(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.LoginUserRequest],
|
||||
) (*connect.Response[mantraev1.LoginUserResponse], error) {
|
||||
var user db.User
|
||||
var err error
|
||||
switch id := req.Msg.GetIdentifier().(type) {
|
||||
case *mantraev1.LoginUserRequest_Username:
|
||||
user, err = s.app.Conn.GetQuery().GetUserByUsername(ctx, id.Username)
|
||||
case *mantraev1.LoginUserRequest_Email:
|
||||
user, err = s.app.Conn.GetQuery().GetUserByEmail(ctx, &id.Email)
|
||||
default:
|
||||
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("one of username or email must be set"))
|
||||
}
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
if err = bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(req.Msg.Password)); err != nil {
|
||||
return nil, connect.NewError(connect.CodeUnauthenticated, err)
|
||||
}
|
||||
|
||||
expirationTime := time.Now().Add(24 * time.Hour)
|
||||
if req.Msg.Remember {
|
||||
expirationTime = time.Now().Add(30 * 24 * time.Hour)
|
||||
}
|
||||
token, err := util.EncodeUserJWT(user.Username, s.app.Config.Secret, expirationTime)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
if err := s.app.Conn.GetQuery().UpdateUserLastLogin(ctx, user.ID); err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
return connect.NewResponse(&mantraev1.LoginUserResponse{
|
||||
Token: token,
|
||||
}), nil
|
||||
}
|
||||
|
||||
func (s *UserService) VerifyJWT(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.VerifyJWTRequest],
|
||||
) (*connect.Response[mantraev1.VerifyJWTResponse], error) {
|
||||
val := ctx.Value(middlewares.AuthUserIDKey)
|
||||
userID, ok := val.(string)
|
||||
if !ok || userID == "" {
|
||||
return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("unauthenticated"))
|
||||
}
|
||||
|
||||
return connect.NewResponse(&mantraev1.VerifyJWTResponse{UserId: userID}), nil
|
||||
}
|
||||
|
||||
func (s *UserService) VerifyOTP(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.VerifyOTPRequest],
|
||||
) (*connect.Response[mantraev1.VerifyOTPResponse], error) {
|
||||
var user db.User
|
||||
var err error
|
||||
switch id := req.Msg.GetIdentifier().(type) {
|
||||
case *mantraev1.VerifyOTPRequest_Username:
|
||||
user, err = s.app.Conn.GetQuery().GetUserByUsername(ctx, id.Username)
|
||||
case *mantraev1.VerifyOTPRequest_Email:
|
||||
user, err = s.app.Conn.GetQuery().GetUserByEmail(ctx, &id.Email)
|
||||
default:
|
||||
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("one of username or email must be set"))
|
||||
}
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
if user.Otp == nil || user.OtpExpiry == nil {
|
||||
return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("no OTP token found"))
|
||||
}
|
||||
|
||||
if *user.Otp != util.HashOTP(req.Msg.Otp) {
|
||||
return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("invalid OTP token"))
|
||||
}
|
||||
|
||||
if time.Now().After(*user.OtpExpiry) {
|
||||
return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("OTP token expired"))
|
||||
}
|
||||
|
||||
expirationTime := time.Now().Add(1 * time.Hour)
|
||||
token, err := util.EncodeUserJWT(user.Username, s.app.Config.Secret, expirationTime)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
if err := s.app.Conn.GetQuery().UpdateUserLastLogin(ctx, user.ID); err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
return connect.NewResponse(&mantraev1.VerifyOTPResponse{Token: token}), nil
|
||||
}
|
||||
|
||||
func (s *UserService) SendOTP(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.SendOTPRequest],
|
||||
) (*connect.Response[mantraev1.SendOTPResponse], error) {
|
||||
var user db.User
|
||||
var err error
|
||||
switch id := req.Msg.GetIdentifier().(type) {
|
||||
case *mantraev1.SendOTPRequest_Username:
|
||||
user, err = s.app.Conn.GetQuery().GetUserByUsername(ctx, id.Username)
|
||||
case *mantraev1.SendOTPRequest_Email:
|
||||
user, err = s.app.Conn.GetQuery().GetUserByEmail(ctx, &id.Email)
|
||||
default:
|
||||
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("one of username or email must be set"))
|
||||
}
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
// Generate OTP
|
||||
expiresAt := time.Now().Add(15 * time.Minute)
|
||||
token, err := util.GenerateOTP()
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
hash := util.HashOTP(token)
|
||||
|
||||
if err := s.app.Conn.GetQuery().UpdateUserResetToken(ctx, db.UpdateUserResetTokenParams{
|
||||
ID: user.ID,
|
||||
Otp: &hash,
|
||||
OtpExpiry: &expiresAt,
|
||||
}); err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
sets, err := s.app.SM.GetAll(ctx)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
var config mail.EmailConfig
|
||||
for _, s := range sets {
|
||||
switch s.Value {
|
||||
case settings.KeyEmailHost:
|
||||
config.Host = s.Value.(string)
|
||||
case settings.KeyEmailPort:
|
||||
config.Port = s.Value.(string)
|
||||
case settings.KeyEmailUser:
|
||||
config.Username = s.Value.(string)
|
||||
case settings.KeyEmailPassword:
|
||||
config.Password = s.Value.(string)
|
||||
case settings.KeyEmailFrom:
|
||||
config.From = s.Value.(string)
|
||||
}
|
||||
}
|
||||
data := map[string]any{
|
||||
"Token": token,
|
||||
"Date": expiresAt.Format("Jan 2, 2006 at 15:04"),
|
||||
}
|
||||
if err := mail.Send(*user.Email, "reset-password", config, data); err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
return connect.NewResponse(&mantraev1.SendOTPResponse{}), nil
|
||||
}
|
||||
|
||||
func (s *UserService) GetUser(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.GetUserRequest],
|
||||
) (*connect.Response[mantraev1.GetUserResponse], error) {
|
||||
var user db.User
|
||||
var err error
|
||||
switch id := req.Msg.GetIdentifier().(type) {
|
||||
case *mantraev1.GetUserRequest_Id:
|
||||
user, err = s.app.Conn.GetQuery().GetUserByID(ctx, id.Id)
|
||||
case *mantraev1.GetUserRequest_Username:
|
||||
user, err = s.app.Conn.GetQuery().GetUserByUsername(ctx, id.Username)
|
||||
case *mantraev1.GetUserRequest_Email:
|
||||
user, err = s.app.Conn.GetQuery().GetUserByEmail(ctx, &id.Email)
|
||||
default:
|
||||
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("one of id, username, or email must be set"))
|
||||
}
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
return connect.NewResponse(&mantraev1.GetUserResponse{
|
||||
User: &mantraev1.User{
|
||||
Id: user.ID,
|
||||
Username: user.Username,
|
||||
Email: SafeString(user.Email),
|
||||
IsAdmin: user.IsAdmin,
|
||||
LastLogin: SafeTimestamp(user.LastLogin),
|
||||
CreatedAt: SafeTimestamp(user.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(user.UpdatedAt),
|
||||
},
|
||||
}), nil
|
||||
}
|
||||
|
||||
func (s *UserService) CreateUser(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.CreateUserRequest],
|
||||
) (*connect.Response[mantraev1.CreateUserResponse], error) {
|
||||
params := db.CreateUserParams{
|
||||
Username: req.Msg.Username,
|
||||
Password: req.Msg.Password,
|
||||
IsAdmin: req.Msg.IsAdmin,
|
||||
}
|
||||
if req.Msg.Email != "" {
|
||||
params.Email = &req.Msg.Email
|
||||
}
|
||||
user, err := s.app.Conn.GetQuery().CreateUser(ctx, params)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.CreateUserResponse{
|
||||
User: &mantraev1.User{
|
||||
Id: user.ID,
|
||||
Username: user.Username,
|
||||
Email: SafeString(user.Email),
|
||||
IsAdmin: user.IsAdmin,
|
||||
LastLogin: SafeTimestamp(user.LastLogin),
|
||||
CreatedAt: SafeTimestamp(user.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(user.UpdatedAt),
|
||||
},
|
||||
}), nil
|
||||
}
|
||||
|
||||
func (s *UserService) UpdateUser(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.UpdateUserRequest],
|
||||
) (*connect.Response[mantraev1.UpdateUserResponse], error) {
|
||||
params := db.UpdateUserParams{
|
||||
ID: req.Msg.Id,
|
||||
Username: req.Msg.Username,
|
||||
IsAdmin: req.Msg.IsAdmin,
|
||||
}
|
||||
if req.Msg.Email != "" {
|
||||
params.Email = &req.Msg.Email
|
||||
}
|
||||
user, err := s.app.Conn.GetQuery().UpdateUser(ctx, params)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.UpdateUserResponse{
|
||||
User: &mantraev1.User{
|
||||
Id: user.ID,
|
||||
Username: user.Username,
|
||||
Email: SafeString(user.Email),
|
||||
IsAdmin: user.IsAdmin,
|
||||
LastLogin: SafeTimestamp(user.LastLogin),
|
||||
CreatedAt: SafeTimestamp(user.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(user.UpdatedAt),
|
||||
},
|
||||
}), nil
|
||||
}
|
||||
|
||||
func (s *UserService) DeleteUser(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.DeleteUserRequest],
|
||||
) (*connect.Response[mantraev1.DeleteUserResponse], error) {
|
||||
err := s.app.Conn.GetQuery().DeleteUser(ctx, req.Msg.Id)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.DeleteUserResponse{}), nil
|
||||
}
|
||||
|
||||
func (s *UserService) ListUsers(
|
||||
ctx context.Context,
|
||||
req *connect.Request[mantraev1.ListUsersRequest],
|
||||
) (*connect.Response[mantraev1.ListUsersResponse], error) {
|
||||
var params db.ListUsersParams
|
||||
if req.Msg.Limit == nil {
|
||||
params.Limit = 100
|
||||
} else {
|
||||
params.Limit = *req.Msg.Limit
|
||||
}
|
||||
if req.Msg.Offset == nil {
|
||||
params.Offset = 0
|
||||
} else {
|
||||
params.Offset = *req.Msg.Offset
|
||||
}
|
||||
|
||||
dbUsers, err := s.app.Conn.GetQuery().ListUsers(ctx, params)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
totalCount, err := s.app.Conn.GetQuery().CountUsers(ctx)
|
||||
if err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
||||
var users []*mantraev1.User
|
||||
for _, user := range dbUsers {
|
||||
users = append(users, &mantraev1.User{
|
||||
Id: user.ID,
|
||||
Username: user.Username,
|
||||
Email: SafeString(user.Email),
|
||||
IsAdmin: user.IsAdmin,
|
||||
LastLogin: SafeTimestamp(user.LastLogin),
|
||||
CreatedAt: SafeTimestamp(user.CreatedAt),
|
||||
UpdatedAt: SafeTimestamp(user.UpdatedAt),
|
||||
})
|
||||
}
|
||||
return connect.NewResponse(&mantraev1.ListUsersResponse{
|
||||
Users: users,
|
||||
TotalCount: totalCount,
|
||||
}), nil
|
||||
}
|
||||
@@ -142,12 +142,8 @@ func (a *App) setDefaultProfile(ctx context.Context) error {
|
||||
q := a.Conn.GetQuery()
|
||||
profile, err := q.GetProfileByName(ctx, a.Config.Traefik.Profile)
|
||||
if err != nil {
|
||||
profileID, err := q.CreateProfile(ctx, db.CreateProfileParams{
|
||||
Name: a.Config.Traefik.Profile,
|
||||
Url: a.Config.Traefik.URL,
|
||||
Username: &a.Config.Traefik.Username,
|
||||
Password: &a.Config.Traefik.Password,
|
||||
Tls: a.Config.Traefik.TLS,
|
||||
profile, err := q.CreateProfile(ctx, db.CreateProfileParams{
|
||||
Name: a.Config.Traefik.Profile,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create default profile: %w", err)
|
||||
@@ -155,7 +151,7 @@ func (a *App) setDefaultProfile(ctx context.Context) error {
|
||||
|
||||
// Create default local config
|
||||
if err := q.UpsertTraefikConfig(ctx, db.UpsertTraefikConfigParams{
|
||||
ProfileID: profileID,
|
||||
ProfileID: profile.ID,
|
||||
Source: source.Local,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("failed to create default profile: %w", err)
|
||||
|
||||
@@ -1,20 +1,117 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE "profiles" (
|
||||
id TEXT PRIMARY KEY,
|
||||
id INTEGER PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL UNIQUE,
|
||||
description TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE dns_providers (
|
||||
CREATE TABLE "entry_points" (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL UNIQUE,
|
||||
type VARCHAR(255) NOT NULL,
|
||||
config JSON NOT NULL,
|
||||
is_active BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
profile_id INTEGER NOT NULL,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
address VARCHAR(255) NOT NULL,
|
||||
is_default BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE http_routers (
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile_id INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
config TEXT NOT NULL,
|
||||
source TEXT DEFAULT 'user',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
|
||||
UNIQUE (profile_id, name)
|
||||
);
|
||||
|
||||
CREATE TABLE tcp_routers (
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile_id INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
config TEXT NOT NULL,
|
||||
source TEXT DEFAULT 'user',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
|
||||
UNIQUE (profile_id, name)
|
||||
);
|
||||
|
||||
CREATE TABLE udp_routers (
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile_id INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
config TEXT NOT NULL,
|
||||
source TEXT DEFAULT 'user',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
|
||||
UNIQUE (profile_id, name)
|
||||
);
|
||||
|
||||
CREATE TABLE http_services (
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile_id INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
config TEXT NOT NULL,
|
||||
source TEXT DEFAULT 'user',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
|
||||
UNIQUE (profile_id, name)
|
||||
);
|
||||
|
||||
CREATE TABLE tcp_services (
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile_id INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
config TEXT NOT NULL,
|
||||
source TEXT DEFAULT 'user',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
|
||||
UNIQUE (profile_id, name)
|
||||
);
|
||||
|
||||
CREATE TABLE udp_services (
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile_id INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
config TEXT NOT NULL,
|
||||
source TEXT DEFAULT 'user',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
|
||||
UNIQUE (profile_id, name)
|
||||
);
|
||||
|
||||
CREATE TABLE http_middlewares (
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile_id INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
config TEXT NOT NULL,
|
||||
source TEXT DEFAULT 'user',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
|
||||
UNIQUE (profile_id, name)
|
||||
);
|
||||
|
||||
CREATE TABLE tcp_middlewares (
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile_id INTEGER NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
config TEXT NOT NULL,
|
||||
source TEXT DEFAULT 'user',
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (profile_id) REFERENCES profiles (id) ON DELETE CASCADE,
|
||||
UNIQUE (profile_id, name)
|
||||
);
|
||||
|
||||
CREATE TABLE traefik (
|
||||
@@ -34,7 +131,7 @@ CREATE TABLE traefik (
|
||||
);
|
||||
|
||||
CREATE TABLE "users" (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
id TEXT PRIMARY KEY,
|
||||
username VARCHAR(255) NOT NULL UNIQUE,
|
||||
password TEXT NOT NULL,
|
||||
email VARCHAR(255),
|
||||
@@ -46,6 +143,16 @@ CREATE TABLE "users" (
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE dns_providers (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL UNIQUE,
|
||||
type VARCHAR(255) NOT NULL,
|
||||
config JSON NOT NULL,
|
||||
is_active BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE "settings" (
|
||||
key VARCHAR(255) PRIMARY KEY,
|
||||
value TEXT NOT NULL,
|
||||
@@ -77,7 +184,7 @@ CREATE TABLE "router_dns_provider" (
|
||||
);
|
||||
|
||||
CREATE TABLE errors (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile_id INTEGER NOT NULL,
|
||||
category TEXT NOT NULL,
|
||||
message TEXT NOT NULL,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
// source: agents.sql
|
||||
|
||||
package db
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
|
||||
package db
|
||||
|
||||
@@ -27,15 +27,24 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
|
||||
if q.addRouterDNSProviderStmt, err = db.PrepareContext(ctx, addRouterDNSProvider); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query AddRouterDNSProvider: %w", err)
|
||||
}
|
||||
if q.countEntryPointsStmt, err = db.PrepareContext(ctx, countEntryPoints); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountEntryPoints: %w", err)
|
||||
}
|
||||
if q.countProfilesStmt, err = db.PrepareContext(ctx, countProfiles); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountProfiles: %w", err)
|
||||
}
|
||||
if q.countUsersStmt, err = db.PrepareContext(ctx, countUsers); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CountUsers: %w", err)
|
||||
}
|
||||
if q.createAgentStmt, err = db.PrepareContext(ctx, createAgent); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CreateAgent: %w", err)
|
||||
}
|
||||
if q.createDNSProviderStmt, err = db.PrepareContext(ctx, createDNSProvider); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CreateDNSProvider: %w", err)
|
||||
}
|
||||
if q.createEntryPointStmt, err = db.PrepareContext(ctx, createEntryPoint); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CreateEntryPoint: %w", err)
|
||||
}
|
||||
if q.createProfileStmt, err = db.PrepareContext(ctx, createProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query CreateProfile: %w", err)
|
||||
}
|
||||
@@ -48,6 +57,9 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
|
||||
if q.deleteDNSProviderStmt, err = db.PrepareContext(ctx, deleteDNSProvider); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query DeleteDNSProvider: %w", err)
|
||||
}
|
||||
if q.deleteEntryPointStmt, err = db.PrepareContext(ctx, deleteEntryPoint); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query DeleteEntryPoint: %w", err)
|
||||
}
|
||||
if q.deleteErrorByIdStmt, err = db.PrepareContext(ctx, deleteErrorById); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query DeleteErrorById: %w", err)
|
||||
}
|
||||
@@ -90,6 +102,9 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
|
||||
if q.getDNSProviderStmt, err = db.PrepareContext(ctx, getDNSProvider); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query GetDNSProvider: %w", err)
|
||||
}
|
||||
if q.getEntryPointStmt, err = db.PrepareContext(ctx, getEntryPoint); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query GetEntryPoint: %w", err)
|
||||
}
|
||||
if q.getErrorsByProfileStmt, err = db.PrepareContext(ctx, getErrorsByProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query GetErrorsByProfile: %w", err)
|
||||
}
|
||||
@@ -117,18 +132,15 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
|
||||
if q.getTraefikConfigBySourceStmt, err = db.PrepareContext(ctx, getTraefikConfigBySource); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query GetTraefikConfigBySource: %w", err)
|
||||
}
|
||||
if q.getUserStmt, err = db.PrepareContext(ctx, getUser); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query GetUser: %w", err)
|
||||
}
|
||||
if q.getUserByEmailStmt, err = db.PrepareContext(ctx, getUserByEmail); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query GetUserByEmail: %w", err)
|
||||
}
|
||||
if q.getUserByIDStmt, err = db.PrepareContext(ctx, getUserByID); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query GetUserByID: %w", err)
|
||||
}
|
||||
if q.getUserByUsernameStmt, err = db.PrepareContext(ctx, getUserByUsername); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query GetUserByUsername: %w", err)
|
||||
}
|
||||
if q.getUserPasswordStmt, err = db.PrepareContext(ctx, getUserPassword); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query GetUserPassword: %w", err)
|
||||
}
|
||||
if q.listAgentsStmt, err = db.PrepareContext(ctx, listAgents); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListAgents: %w", err)
|
||||
}
|
||||
@@ -138,6 +150,9 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
|
||||
if q.listDNSProvidersStmt, err = db.PrepareContext(ctx, listDNSProviders); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListDNSProviders: %w", err)
|
||||
}
|
||||
if q.listEntryPointsStmt, err = db.PrepareContext(ctx, listEntryPoints); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListEntryPoints: %w", err)
|
||||
}
|
||||
if q.listErrorsStmt, err = db.PrepareContext(ctx, listErrors); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query ListErrors: %w", err)
|
||||
}
|
||||
@@ -171,9 +186,15 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
|
||||
if q.updateDNSProviderStmt, err = db.PrepareContext(ctx, updateDNSProvider); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query UpdateDNSProvider: %w", err)
|
||||
}
|
||||
if q.updateEntryPointStmt, err = db.PrepareContext(ctx, updateEntryPoint); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query UpdateEntryPoint: %w", err)
|
||||
}
|
||||
if q.updateProfileStmt, err = db.PrepareContext(ctx, updateProfile); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query UpdateProfile: %w", err)
|
||||
}
|
||||
if q.updateSettingStmt, err = db.PrepareContext(ctx, updateSetting); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query UpdateSetting: %w", err)
|
||||
}
|
||||
if q.updateUserStmt, err = db.PrepareContext(ctx, updateUser); err != nil {
|
||||
return nil, fmt.Errorf("error preparing query UpdateUser: %w", err)
|
||||
}
|
||||
@@ -205,11 +226,21 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing addRouterDNSProviderStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countEntryPointsStmt != nil {
|
||||
if cerr := q.countEntryPointsStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countEntryPointsStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countProfilesStmt != nil {
|
||||
if cerr := q.countProfilesStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countProfilesStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.countUsersStmt != nil {
|
||||
if cerr := q.countUsersStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing countUsersStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.createAgentStmt != nil {
|
||||
if cerr := q.createAgentStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing createAgentStmt: %w", cerr)
|
||||
@@ -220,6 +251,11 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing createDNSProviderStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.createEntryPointStmt != nil {
|
||||
if cerr := q.createEntryPointStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing createEntryPointStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.createProfileStmt != nil {
|
||||
if cerr := q.createProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing createProfileStmt: %w", cerr)
|
||||
@@ -240,6 +276,11 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing deleteDNSProviderStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.deleteEntryPointStmt != nil {
|
||||
if cerr := q.deleteEntryPointStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing deleteEntryPointStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.deleteErrorByIdStmt != nil {
|
||||
if cerr := q.deleteErrorByIdStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing deleteErrorByIdStmt: %w", cerr)
|
||||
@@ -310,6 +351,11 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing getDNSProviderStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.getEntryPointStmt != nil {
|
||||
if cerr := q.getEntryPointStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing getEntryPointStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.getErrorsByProfileStmt != nil {
|
||||
if cerr := q.getErrorsByProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing getErrorsByProfileStmt: %w", cerr)
|
||||
@@ -355,26 +401,21 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing getTraefikConfigBySourceStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.getUserStmt != nil {
|
||||
if cerr := q.getUserStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing getUserStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.getUserByEmailStmt != nil {
|
||||
if cerr := q.getUserByEmailStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing getUserByEmailStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.getUserByIDStmt != nil {
|
||||
if cerr := q.getUserByIDStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing getUserByIDStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.getUserByUsernameStmt != nil {
|
||||
if cerr := q.getUserByUsernameStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing getUserByUsernameStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.getUserPasswordStmt != nil {
|
||||
if cerr := q.getUserPasswordStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing getUserPasswordStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listAgentsStmt != nil {
|
||||
if cerr := q.listAgentsStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listAgentsStmt: %w", cerr)
|
||||
@@ -390,6 +431,11 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing listDNSProvidersStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listEntryPointsStmt != nil {
|
||||
if cerr := q.listEntryPointsStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listEntryPointsStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.listErrorsStmt != nil {
|
||||
if cerr := q.listErrorsStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing listErrorsStmt: %w", cerr)
|
||||
@@ -445,11 +491,21 @@ func (q *Queries) Close() error {
|
||||
err = fmt.Errorf("error closing updateDNSProviderStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.updateEntryPointStmt != nil {
|
||||
if cerr := q.updateEntryPointStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing updateEntryPointStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.updateProfileStmt != nil {
|
||||
if cerr := q.updateProfileStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing updateProfileStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.updateSettingStmt != nil {
|
||||
if cerr := q.updateSettingStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing updateSettingStmt: %w", cerr)
|
||||
}
|
||||
}
|
||||
if q.updateUserStmt != nil {
|
||||
if cerr := q.updateUserStmt.Close(); cerr != nil {
|
||||
err = fmt.Errorf("error closing updateUserStmt: %w", cerr)
|
||||
@@ -525,13 +581,17 @@ type Queries struct {
|
||||
db DBTX
|
||||
tx *sql.Tx
|
||||
addRouterDNSProviderStmt *sql.Stmt
|
||||
countEntryPointsStmt *sql.Stmt
|
||||
countProfilesStmt *sql.Stmt
|
||||
countUsersStmt *sql.Stmt
|
||||
createAgentStmt *sql.Stmt
|
||||
createDNSProviderStmt *sql.Stmt
|
||||
createEntryPointStmt *sql.Stmt
|
||||
createProfileStmt *sql.Stmt
|
||||
createUserStmt *sql.Stmt
|
||||
deleteAgentStmt *sql.Stmt
|
||||
deleteDNSProviderStmt *sql.Stmt
|
||||
deleteEntryPointStmt *sql.Stmt
|
||||
deleteErrorByIdStmt *sql.Stmt
|
||||
deleteErrorsByProfileStmt *sql.Stmt
|
||||
deleteErrorsByProfileCategoryStmt *sql.Stmt
|
||||
@@ -546,6 +606,7 @@ type Queries struct {
|
||||
getAgentStmt *sql.Stmt
|
||||
getAgentTraefikConfigsStmt *sql.Stmt
|
||||
getDNSProviderStmt *sql.Stmt
|
||||
getEntryPointStmt *sql.Stmt
|
||||
getErrorsByProfileStmt *sql.Stmt
|
||||
getLocalTraefikConfigStmt *sql.Stmt
|
||||
getProfileStmt *sql.Stmt
|
||||
@@ -555,13 +616,13 @@ type Queries struct {
|
||||
getSettingStmt *sql.Stmt
|
||||
getTraefikConfigByIDStmt *sql.Stmt
|
||||
getTraefikConfigBySourceStmt *sql.Stmt
|
||||
getUserStmt *sql.Stmt
|
||||
getUserByEmailStmt *sql.Stmt
|
||||
getUserByIDStmt *sql.Stmt
|
||||
getUserByUsernameStmt *sql.Stmt
|
||||
getUserPasswordStmt *sql.Stmt
|
||||
listAgentsStmt *sql.Stmt
|
||||
listAgentsByProfileStmt *sql.Stmt
|
||||
listDNSProvidersStmt *sql.Stmt
|
||||
listEntryPointsStmt *sql.Stmt
|
||||
listErrorsStmt *sql.Stmt
|
||||
listProfilesStmt *sql.Stmt
|
||||
listRouterDNSProvidersByTraefikIDStmt *sql.Stmt
|
||||
@@ -573,7 +634,9 @@ type Queries struct {
|
||||
updateAgentIPStmt *sql.Stmt
|
||||
updateAgentTokenStmt *sql.Stmt
|
||||
updateDNSProviderStmt *sql.Stmt
|
||||
updateEntryPointStmt *sql.Stmt
|
||||
updateProfileStmt *sql.Stmt
|
||||
updateSettingStmt *sql.Stmt
|
||||
updateUserStmt *sql.Stmt
|
||||
updateUserLastLoginStmt *sql.Stmt
|
||||
updateUserPasswordStmt *sql.Stmt
|
||||
@@ -588,13 +651,17 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries {
|
||||
db: tx,
|
||||
tx: tx,
|
||||
addRouterDNSProviderStmt: q.addRouterDNSProviderStmt,
|
||||
countEntryPointsStmt: q.countEntryPointsStmt,
|
||||
countProfilesStmt: q.countProfilesStmt,
|
||||
countUsersStmt: q.countUsersStmt,
|
||||
createAgentStmt: q.createAgentStmt,
|
||||
createDNSProviderStmt: q.createDNSProviderStmt,
|
||||
createEntryPointStmt: q.createEntryPointStmt,
|
||||
createProfileStmt: q.createProfileStmt,
|
||||
createUserStmt: q.createUserStmt,
|
||||
deleteAgentStmt: q.deleteAgentStmt,
|
||||
deleteDNSProviderStmt: q.deleteDNSProviderStmt,
|
||||
deleteEntryPointStmt: q.deleteEntryPointStmt,
|
||||
deleteErrorByIdStmt: q.deleteErrorByIdStmt,
|
||||
deleteErrorsByProfileStmt: q.deleteErrorsByProfileStmt,
|
||||
deleteErrorsByProfileCategoryStmt: q.deleteErrorsByProfileCategoryStmt,
|
||||
@@ -609,6 +676,7 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries {
|
||||
getAgentStmt: q.getAgentStmt,
|
||||
getAgentTraefikConfigsStmt: q.getAgentTraefikConfigsStmt,
|
||||
getDNSProviderStmt: q.getDNSProviderStmt,
|
||||
getEntryPointStmt: q.getEntryPointStmt,
|
||||
getErrorsByProfileStmt: q.getErrorsByProfileStmt,
|
||||
getLocalTraefikConfigStmt: q.getLocalTraefikConfigStmt,
|
||||
getProfileStmt: q.getProfileStmt,
|
||||
@@ -618,13 +686,13 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries {
|
||||
getSettingStmt: q.getSettingStmt,
|
||||
getTraefikConfigByIDStmt: q.getTraefikConfigByIDStmt,
|
||||
getTraefikConfigBySourceStmt: q.getTraefikConfigBySourceStmt,
|
||||
getUserStmt: q.getUserStmt,
|
||||
getUserByEmailStmt: q.getUserByEmailStmt,
|
||||
getUserByIDStmt: q.getUserByIDStmt,
|
||||
getUserByUsernameStmt: q.getUserByUsernameStmt,
|
||||
getUserPasswordStmt: q.getUserPasswordStmt,
|
||||
listAgentsStmt: q.listAgentsStmt,
|
||||
listAgentsByProfileStmt: q.listAgentsByProfileStmt,
|
||||
listDNSProvidersStmt: q.listDNSProvidersStmt,
|
||||
listEntryPointsStmt: q.listEntryPointsStmt,
|
||||
listErrorsStmt: q.listErrorsStmt,
|
||||
listProfilesStmt: q.listProfilesStmt,
|
||||
listRouterDNSProvidersByTraefikIDStmt: q.listRouterDNSProvidersByTraefikIDStmt,
|
||||
@@ -636,7 +704,9 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries {
|
||||
updateAgentIPStmt: q.updateAgentIPStmt,
|
||||
updateAgentTokenStmt: q.updateAgentTokenStmt,
|
||||
updateDNSProviderStmt: q.updateDNSProviderStmt,
|
||||
updateEntryPointStmt: q.updateEntryPointStmt,
|
||||
updateProfileStmt: q.updateProfileStmt,
|
||||
updateSettingStmt: q.updateSettingStmt,
|
||||
updateUserStmt: q.updateUserStmt,
|
||||
updateUserLastLoginStmt: q.updateUserLastLoginStmt,
|
||||
updateUserPasswordStmt: q.updateUserPasswordStmt,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
// source: dns_providers.sql
|
||||
|
||||
package db
|
||||
|
||||
198
internal/db/entry_points.sql.go
Normal file
198
internal/db/entry_points.sql.go
Normal file
@@ -0,0 +1,198 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.28.0
|
||||
// source: entry_points.sql
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
const countEntryPoints = `-- name: CountEntryPoints :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
entry_points
|
||||
`
|
||||
|
||||
func (q *Queries) CountEntryPoints(ctx context.Context) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countEntryPointsStmt, countEntryPoints)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createEntryPoint = `-- name: CreateEntryPoint :one
|
||||
INSERT INTO
|
||||
entry_points (
|
||||
id,
|
||||
profile_id,
|
||||
name,
|
||||
address,
|
||||
is_default,
|
||||
created_at,
|
||||
updated_at
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
CURRENT_TIMESTAMP,
|
||||
CURRENT_TIMESTAMP
|
||||
) RETURNING id, profile_id, name, address, is_default, created_at, updated_at
|
||||
`
|
||||
|
||||
type CreateEntryPointParams struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Address string `json:"address"`
|
||||
IsDefault bool `json:"isDefault"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateEntryPoint(ctx context.Context, arg CreateEntryPointParams) (EntryPoint, error) {
|
||||
row := q.queryRow(ctx, q.createEntryPointStmt, createEntryPoint,
|
||||
arg.ID,
|
||||
arg.ProfileID,
|
||||
arg.Name,
|
||||
arg.Address,
|
||||
arg.IsDefault,
|
||||
)
|
||||
var i EntryPoint
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.Name,
|
||||
&i.Address,
|
||||
&i.IsDefault,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteEntryPoint = `-- name: DeleteEntryPoint :exec
|
||||
DELETE FROM entry_points
|
||||
WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteEntryPoint(ctx context.Context, id int64) error {
|
||||
_, err := q.exec(ctx, q.deleteEntryPointStmt, deleteEntryPoint, id)
|
||||
return err
|
||||
}
|
||||
|
||||
const getEntryPoint = `-- name: GetEntryPoint :one
|
||||
SELECT
|
||||
id, profile_id, name, address, is_default, created_at, updated_at
|
||||
FROM
|
||||
entry_points
|
||||
WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) GetEntryPoint(ctx context.Context, id int64) (EntryPoint, error) {
|
||||
row := q.queryRow(ctx, q.getEntryPointStmt, getEntryPoint, id)
|
||||
var i EntryPoint
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.Name,
|
||||
&i.Address,
|
||||
&i.IsDefault,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const listEntryPoints = `-- name: ListEntryPoints :many
|
||||
SELECT
|
||||
id, profile_id, name, address, is_default, created_at, updated_at
|
||||
FROM
|
||||
entry_points
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListEntryPointsParams struct {
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListEntryPoints(ctx context.Context, arg ListEntryPointsParams) ([]EntryPoint, error) {
|
||||
rows, err := q.query(ctx, q.listEntryPointsStmt, listEntryPoints, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []EntryPoint
|
||||
for rows.Next() {
|
||||
var i EntryPoint
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.Name,
|
||||
&i.Address,
|
||||
&i.IsDefault,
|
||||
&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 updateEntryPoint = `-- name: UpdateEntryPoint :one
|
||||
UPDATE entry_points
|
||||
SET
|
||||
name = ?,
|
||||
address = ?,
|
||||
is_default = ?,
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
WHERE
|
||||
id = ? RETURNING id, profile_id, name, address, is_default, created_at, updated_at
|
||||
`
|
||||
|
||||
type UpdateEntryPointParams struct {
|
||||
Name string `json:"name"`
|
||||
Address string `json:"address"`
|
||||
IsDefault bool `json:"isDefault"`
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateEntryPoint(ctx context.Context, arg UpdateEntryPointParams) (EntryPoint, error) {
|
||||
row := q.queryRow(ctx, q.updateEntryPointStmt, updateEntryPoint,
|
||||
arg.Name,
|
||||
arg.Address,
|
||||
arg.IsDefault,
|
||||
arg.ID,
|
||||
)
|
||||
var i EntryPoint
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.ProfileID,
|
||||
&i.Name,
|
||||
&i.Address,
|
||||
&i.IsDefault,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
// source: errors.sql
|
||||
|
||||
package db
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
|
||||
package db
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/MizuchiLabs/mantrae/internal/source"
|
||||
"github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
)
|
||||
|
||||
type Agent struct {
|
||||
@@ -33,6 +34,16 @@ type DnsProvider struct {
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type EntryPoint struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Address string `json:"address"`
|
||||
IsDefault bool `json:"isDefault"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type Error struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
@@ -42,8 +53,38 @@ type Error struct {
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
type HttpMiddleware struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Config *dynamic.Middleware `json:"config"`
|
||||
Source *string `json:"source"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type HttpRouter struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Config *dynamic.Router `json:"config"`
|
||||
Source *string `json:"source"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type HttpService struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Config *dynamic.Service `json:"config"`
|
||||
Source *string `json:"source"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type Profile struct {
|
||||
ID string `json:"id"`
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
@@ -63,6 +104,36 @@ type Setting struct {
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type TcpMiddleware struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Config *dynamic.TCPMiddleware `json:"config"`
|
||||
Source *string `json:"source"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type TcpRouter struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Config *dynamic.TCPRouter `json:"config"`
|
||||
Source *string `json:"source"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type TcpService struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Config *dynamic.TCPService `json:"config"`
|
||||
Source *string `json:"source"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type Traefik struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
@@ -76,8 +147,28 @@ type Traefik struct {
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type UdpRouter struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Config *dynamic.UDPRouter `json:"config"`
|
||||
Source *string `json:"source"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type UdpService struct {
|
||||
ID int64 `json:"id"`
|
||||
ProfileID int64 `json:"profileId"`
|
||||
Name string `json:"name"`
|
||||
Config *dynamic.UDPService `json:"config"`
|
||||
Source *string `json:"source"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID int64 `json:"id"`
|
||||
ID string `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Email *string `json:"email"`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
// source: profiles.sql
|
||||
|
||||
package db
|
||||
@@ -31,7 +31,7 @@ VALUES
|
||||
`
|
||||
|
||||
type CreateProfileParams struct {
|
||||
ID string `json:"id"`
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
}
|
||||
@@ -55,7 +55,7 @@ WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteProfile(ctx context.Context, id string) error {
|
||||
func (q *Queries) DeleteProfile(ctx context.Context, id int64) error {
|
||||
_, err := q.exec(ctx, q.deleteProfileStmt, deleteProfile, id)
|
||||
return err
|
||||
}
|
||||
@@ -69,7 +69,7 @@ WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) GetProfile(ctx context.Context, id string) (Profile, error) {
|
||||
func (q *Queries) GetProfile(ctx context.Context, id int64) (Profile, error) {
|
||||
row := q.queryRow(ctx, q.getProfileStmt, getProfile, id)
|
||||
var i Profile
|
||||
err := row.Scan(
|
||||
@@ -164,7 +164,7 @@ WHERE
|
||||
type UpdateProfileParams struct {
|
||||
Name string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
ID string `json:"id"`
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateProfile(ctx context.Context, arg UpdateProfileParams) (Profile, error) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
|
||||
package db
|
||||
|
||||
@@ -10,57 +10,64 @@ import (
|
||||
|
||||
type Querier interface {
|
||||
AddRouterDNSProvider(ctx context.Context, arg AddRouterDNSProviderParams) error
|
||||
CountEntryPoints(ctx context.Context) (int64, error)
|
||||
CountProfiles(ctx context.Context) (int64, error)
|
||||
CountUsers(ctx context.Context) (int64, error)
|
||||
CreateAgent(ctx context.Context, arg CreateAgentParams) error
|
||||
CreateDNSProvider(ctx context.Context, arg CreateDNSProviderParams) error
|
||||
CreateEntryPoint(ctx context.Context, arg CreateEntryPointParams) (EntryPoint, error)
|
||||
CreateProfile(ctx context.Context, arg CreateProfileParams) (Profile, error)
|
||||
CreateUser(ctx context.Context, arg CreateUserParams) (int64, error)
|
||||
CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
|
||||
DeleteAgent(ctx context.Context, id string) error
|
||||
DeleteDNSProvider(ctx context.Context, id int64) error
|
||||
DeleteEntryPoint(ctx context.Context, id int64) error
|
||||
DeleteErrorById(ctx context.Context, id int64) error
|
||||
DeleteErrorsByProfile(ctx context.Context, profileID int64) error
|
||||
DeleteErrorsByProfileCategory(ctx context.Context, arg DeleteErrorsByProfileCategoryParams) error
|
||||
DeleteProfile(ctx context.Context, id string) error
|
||||
DeleteProfile(ctx context.Context, id int64) error
|
||||
DeleteRouterDNSProvider(ctx context.Context, arg DeleteRouterDNSProviderParams) error
|
||||
DeleteSetting(ctx context.Context, key string) error
|
||||
DeleteTraefikConfig(ctx context.Context, id int64) error
|
||||
DeleteTraefikConfigByAgent(ctx context.Context, agentID *string) error
|
||||
DeleteUser(ctx context.Context, id int64) error
|
||||
DeleteUser(ctx context.Context, id string) error
|
||||
GetAPITraefikConfig(ctx context.Context, profileID int64) (Traefik, error)
|
||||
GetActiveDNSProvider(ctx context.Context) (DnsProvider, error)
|
||||
GetAgent(ctx context.Context, id string) (Agent, error)
|
||||
GetAgentTraefikConfigs(ctx context.Context, profileID int64) ([]Traefik, error)
|
||||
GetDNSProvider(ctx context.Context, id int64) (DnsProvider, error)
|
||||
GetEntryPoint(ctx context.Context, id int64) (EntryPoint, error)
|
||||
GetErrorsByProfile(ctx context.Context, profileID int64) ([]Error, error)
|
||||
GetLocalTraefikConfig(ctx context.Context, profileID int64) (Traefik, error)
|
||||
GetProfile(ctx context.Context, id string) (Profile, error)
|
||||
GetProfile(ctx context.Context, id int64) (Profile, error)
|
||||
GetProfileByName(ctx context.Context, name string) (Profile, error)
|
||||
GetRouterDNSProviderByID(ctx context.Context, arg GetRouterDNSProviderByIDParams) (GetRouterDNSProviderByIDRow, error)
|
||||
GetRouterDNSProviders(ctx context.Context, arg GetRouterDNSProvidersParams) ([]GetRouterDNSProvidersRow, error)
|
||||
GetSetting(ctx context.Context, key string) (Setting, error)
|
||||
GetTraefikConfigByID(ctx context.Context, id int64) (Traefik, error)
|
||||
GetTraefikConfigBySource(ctx context.Context, arg GetTraefikConfigBySourceParams) ([]Traefik, error)
|
||||
GetUser(ctx context.Context, id int64) (GetUserRow, error)
|
||||
GetUserByEmail(ctx context.Context, email *string) (GetUserByEmailRow, error)
|
||||
GetUserByUsername(ctx context.Context, username string) (GetUserByUsernameRow, error)
|
||||
GetUserPassword(ctx context.Context, id int64) (string, error)
|
||||
GetUserByEmail(ctx context.Context, email *string) (User, error)
|
||||
GetUserByID(ctx context.Context, id string) (User, error)
|
||||
GetUserByUsername(ctx context.Context, username string) (User, error)
|
||||
ListAgents(ctx context.Context) ([]Agent, error)
|
||||
ListAgentsByProfile(ctx context.Context, profileID int64) ([]Agent, error)
|
||||
ListDNSProviders(ctx context.Context) ([]DnsProvider, error)
|
||||
ListEntryPoints(ctx context.Context, arg ListEntryPointsParams) ([]EntryPoint, error)
|
||||
ListErrors(ctx context.Context) ([]Error, error)
|
||||
ListProfiles(ctx context.Context, arg ListProfilesParams) ([]Profile, error)
|
||||
ListRouterDNSProvidersByTraefikID(ctx context.Context, traefikID int64) ([]ListRouterDNSProvidersByTraefikIDRow, error)
|
||||
ListSettings(ctx context.Context) ([]Setting, error)
|
||||
ListTraefikIDs(ctx context.Context) ([]int64, error)
|
||||
ListUsers(ctx context.Context) ([]ListUsersRow, error)
|
||||
ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
|
||||
LogError(ctx context.Context, arg LogErrorParams) error
|
||||
UpdateAgent(ctx context.Context, arg UpdateAgentParams) (Agent, error)
|
||||
UpdateAgentIP(ctx context.Context, arg UpdateAgentIPParams) error
|
||||
UpdateAgentToken(ctx context.Context, arg UpdateAgentTokenParams) error
|
||||
UpdateDNSProvider(ctx context.Context, arg UpdateDNSProviderParams) error
|
||||
UpdateEntryPoint(ctx context.Context, arg UpdateEntryPointParams) (EntryPoint, error)
|
||||
UpdateProfile(ctx context.Context, arg UpdateProfileParams) (Profile, error)
|
||||
UpdateUser(ctx context.Context, arg UpdateUserParams) error
|
||||
UpdateUserLastLogin(ctx context.Context, id int64) error
|
||||
UpdateSetting(ctx context.Context, arg UpdateSettingParams) (Setting, error)
|
||||
UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
|
||||
UpdateUserLastLogin(ctx context.Context, id string) error
|
||||
UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error
|
||||
UpdateUserResetToken(ctx context.Context, arg UpdateUserResetTokenParams) error
|
||||
UpsertSetting(ctx context.Context, arg UpsertSettingParams) error
|
||||
|
||||
62
internal/db/queries/entry_points.sql
Normal file
62
internal/db/queries/entry_points.sql
Normal file
@@ -0,0 +1,62 @@
|
||||
-- name: CreateEntryPoint :one
|
||||
INSERT INTO
|
||||
entry_points (
|
||||
id,
|
||||
profile_id,
|
||||
name,
|
||||
address,
|
||||
is_default,
|
||||
created_at,
|
||||
updated_at
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
?,
|
||||
CURRENT_TIMESTAMP,
|
||||
CURRENT_TIMESTAMP
|
||||
) RETURNING *;
|
||||
|
||||
-- name: GetEntryPoint :one
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
entry_points
|
||||
WHERE
|
||||
id = ?;
|
||||
|
||||
-- name: ListEntryPoints :many
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
entry_points
|
||||
ORDER BY
|
||||
name
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: CountEntryPoints :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
entry_points;
|
||||
|
||||
-- name: UpdateEntryPoint :one
|
||||
UPDATE entry_points
|
||||
SET
|
||||
name = ?,
|
||||
address = ?,
|
||||
is_default = ?,
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
WHERE
|
||||
id = ? RETURNING *;
|
||||
|
||||
-- name: DeleteEntryPoint :exec
|
||||
DELETE FROM entry_points
|
||||
WHERE
|
||||
id = ?;
|
||||
@@ -15,9 +15,7 @@ SELECT
|
||||
FROM
|
||||
settings
|
||||
WHERE
|
||||
key = ?
|
||||
LIMIT
|
||||
1;
|
||||
key = ?;
|
||||
|
||||
-- name: ListSettings :many
|
||||
SELECT
|
||||
@@ -25,6 +23,14 @@ SELECT
|
||||
FROM
|
||||
settings;
|
||||
|
||||
-- name: UpdateSetting :one
|
||||
UPDATE settings
|
||||
SET
|
||||
value = ?,
|
||||
update_at = CURRENT_TIMESTAMP
|
||||
WHERE
|
||||
key = ? RETURNING *;
|
||||
|
||||
-- name: DeleteSetting :exec
|
||||
DELETE FROM settings
|
||||
WHERE
|
||||
|
||||
@@ -2,19 +2,11 @@
|
||||
INSERT INTO
|
||||
users (username, password, email, is_admin)
|
||||
VALUES
|
||||
(?, ?, ?, ?) RETURNING id;
|
||||
(?, ?, ?, ?) RETURNING *;
|
||||
|
||||
-- name: GetUser :one
|
||||
-- name: GetUserByID :one
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
email,
|
||||
is_admin,
|
||||
otp,
|
||||
otp_expiry,
|
||||
last_login,
|
||||
created_at,
|
||||
updated_at
|
||||
*
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
@@ -22,15 +14,7 @@ WHERE
|
||||
|
||||
-- name: GetUserByUsername :one
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
email,
|
||||
is_admin,
|
||||
otp,
|
||||
otp_expiry,
|
||||
last_login,
|
||||
created_at,
|
||||
updated_at
|
||||
*
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
@@ -38,45 +22,31 @@ WHERE
|
||||
|
||||
-- name: GetUserByEmail :one
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
email,
|
||||
is_admin,
|
||||
otp,
|
||||
otp_expiry,
|
||||
last_login,
|
||||
created_at,
|
||||
updated_at
|
||||
*
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
email = ?;
|
||||
|
||||
-- name: GetUserPassword :one
|
||||
SELECT
|
||||
password
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
id = ?;
|
||||
|
||||
-- name: ListUsers :many
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
email,
|
||||
is_admin,
|
||||
otp,
|
||||
otp_expiry,
|
||||
last_login,
|
||||
created_at,
|
||||
updated_at
|
||||
*
|
||||
FROM
|
||||
users
|
||||
ORDER BY
|
||||
username;
|
||||
username
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?;
|
||||
|
||||
-- name: UpdateUser :exec
|
||||
-- name: CountUsers :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
users;
|
||||
|
||||
-- name: UpdateUser :one
|
||||
UPDATE users
|
||||
SET
|
||||
username = ?,
|
||||
@@ -84,7 +54,7 @@ SET
|
||||
is_admin = ?,
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
WHERE
|
||||
id = ?;
|
||||
id = ? RETURNING *;
|
||||
|
||||
-- name: UpdateUserLastLogin :exec
|
||||
UPDATE users
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
// source: router_dns_provider.sql
|
||||
|
||||
package db
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
// source: settings.sql
|
||||
|
||||
package db
|
||||
@@ -27,8 +27,6 @@ FROM
|
||||
settings
|
||||
WHERE
|
||||
key = ?
|
||||
LIMIT
|
||||
1
|
||||
`
|
||||
|
||||
func (q *Queries) GetSetting(ctx context.Context, key string) (Setting, error) {
|
||||
@@ -78,6 +76,32 @@ func (q *Queries) ListSettings(ctx context.Context) ([]Setting, error) {
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateSetting = `-- name: UpdateSetting :one
|
||||
UPDATE settings
|
||||
SET
|
||||
value = ?,
|
||||
update_at = CURRENT_TIMESTAMP
|
||||
WHERE
|
||||
key = ? RETURNING "key", value, description, updated_at
|
||||
`
|
||||
|
||||
type UpdateSettingParams struct {
|
||||
Value string `json:"value"`
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateSetting(ctx context.Context, arg UpdateSettingParams) (Setting, error) {
|
||||
row := q.queryRow(ctx, q.updateSettingStmt, updateSetting, arg.Value, arg.Key)
|
||||
var i Setting
|
||||
err := row.Scan(
|
||||
&i.Key,
|
||||
&i.Value,
|
||||
&i.Description,
|
||||
&i.UpdatedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const upsertSetting = `-- name: UpsertSetting :exec
|
||||
INSERT INTO
|
||||
settings (key, value, description)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
// source: traefik.sql
|
||||
|
||||
package db
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.29.0
|
||||
// sqlc v1.28.0
|
||||
// source: users.sql
|
||||
|
||||
package db
|
||||
@@ -10,11 +10,25 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const countUsers = `-- name: CountUsers :one
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
users
|
||||
`
|
||||
|
||||
func (q *Queries) CountUsers(ctx context.Context) (int64, error) {
|
||||
row := q.queryRow(ctx, q.countUsersStmt, countUsers)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const createUser = `-- name: CreateUser :one
|
||||
INSERT INTO
|
||||
users (username, password, email, is_admin)
|
||||
VALUES
|
||||
(?, ?, ?, ?) RETURNING id
|
||||
(?, ?, ?, ?) RETURNING id, username, password, email, is_admin, otp, otp_expiry, last_login, created_at, updated_at
|
||||
`
|
||||
|
||||
type CreateUserParams struct {
|
||||
@@ -24,64 +38,18 @@ type CreateUserParams struct {
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (int64, error) {
|
||||
func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) {
|
||||
row := q.queryRow(ctx, q.createUserStmt, createUser,
|
||||
arg.Username,
|
||||
arg.Password,
|
||||
arg.Email,
|
||||
arg.IsAdmin,
|
||||
)
|
||||
var id int64
|
||||
err := row.Scan(&id)
|
||||
return id, err
|
||||
}
|
||||
|
||||
const deleteUser = `-- name: DeleteUser :exec
|
||||
DELETE FROM users
|
||||
WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteUser(ctx context.Context, id int64) error {
|
||||
_, err := q.exec(ctx, q.deleteUserStmt, deleteUser, id)
|
||||
return err
|
||||
}
|
||||
|
||||
const getUser = `-- name: GetUser :one
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
email,
|
||||
is_admin,
|
||||
otp,
|
||||
otp_expiry,
|
||||
last_login,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
type GetUserRow struct {
|
||||
ID int64 `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Email *string `json:"email"`
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
Otp *string `json:"otp"`
|
||||
OtpExpiry *time.Time `json:"otpExpiry"`
|
||||
LastLogin *time.Time `json:"lastLogin"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (q *Queries) GetUser(ctx context.Context, id int64) (GetUserRow, error) {
|
||||
row := q.queryRow(ctx, q.getUserStmt, getUser, id)
|
||||
var i GetUserRow
|
||||
var i User
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.Username,
|
||||
&i.Password,
|
||||
&i.Email,
|
||||
&i.IsAdmin,
|
||||
&i.Otp,
|
||||
@@ -93,41 +61,60 @@ func (q *Queries) GetUser(ctx context.Context, id int64) (GetUserRow, error) {
|
||||
return i, err
|
||||
}
|
||||
|
||||
const deleteUser = `-- name: DeleteUser :exec
|
||||
DELETE FROM users
|
||||
WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteUser(ctx context.Context, id string) error {
|
||||
_, err := q.exec(ctx, q.deleteUserStmt, deleteUser, id)
|
||||
return err
|
||||
}
|
||||
|
||||
const getUserByEmail = `-- name: GetUserByEmail :one
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
email,
|
||||
is_admin,
|
||||
otp,
|
||||
otp_expiry,
|
||||
last_login,
|
||||
created_at,
|
||||
updated_at
|
||||
id, username, password, email, is_admin, otp, otp_expiry, last_login, created_at, updated_at
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
email = ?
|
||||
`
|
||||
|
||||
type GetUserByEmailRow struct {
|
||||
ID int64 `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Email *string `json:"email"`
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
Otp *string `json:"otp"`
|
||||
OtpExpiry *time.Time `json:"otpExpiry"`
|
||||
LastLogin *time.Time `json:"lastLogin"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (q *Queries) GetUserByEmail(ctx context.Context, email *string) (GetUserByEmailRow, error) {
|
||||
func (q *Queries) GetUserByEmail(ctx context.Context, email *string) (User, error) {
|
||||
row := q.queryRow(ctx, q.getUserByEmailStmt, getUserByEmail, email)
|
||||
var i GetUserByEmailRow
|
||||
var i User
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.Username,
|
||||
&i.Password,
|
||||
&i.Email,
|
||||
&i.IsAdmin,
|
||||
&i.Otp,
|
||||
&i.OtpExpiry,
|
||||
&i.LastLogin,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const getUserByID = `-- name: GetUserByID :one
|
||||
SELECT
|
||||
id, username, password, email, is_admin, otp, otp_expiry, last_login, created_at, updated_at
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) GetUserByID(ctx context.Context, id string) (User, error) {
|
||||
row := q.queryRow(ctx, q.getUserByIDStmt, getUserByID, id)
|
||||
var i User
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.Username,
|
||||
&i.Password,
|
||||
&i.Email,
|
||||
&i.IsAdmin,
|
||||
&i.Otp,
|
||||
@@ -141,39 +128,20 @@ func (q *Queries) GetUserByEmail(ctx context.Context, email *string) (GetUserByE
|
||||
|
||||
const getUserByUsername = `-- name: GetUserByUsername :one
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
email,
|
||||
is_admin,
|
||||
otp,
|
||||
otp_expiry,
|
||||
last_login,
|
||||
created_at,
|
||||
updated_at
|
||||
id, username, password, email, is_admin, otp, otp_expiry, last_login, created_at, updated_at
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
username = ?
|
||||
`
|
||||
|
||||
type GetUserByUsernameRow struct {
|
||||
ID int64 `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Email *string `json:"email"`
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
Otp *string `json:"otp"`
|
||||
OtpExpiry *time.Time `json:"otpExpiry"`
|
||||
LastLogin *time.Time `json:"lastLogin"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (q *Queries) GetUserByUsername(ctx context.Context, username string) (GetUserByUsernameRow, error) {
|
||||
func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error) {
|
||||
row := q.queryRow(ctx, q.getUserByUsernameStmt, getUserByUsername, username)
|
||||
var i GetUserByUsernameRow
|
||||
var i User
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.Username,
|
||||
&i.Password,
|
||||
&i.Email,
|
||||
&i.IsAdmin,
|
||||
&i.Otp,
|
||||
@@ -185,63 +153,37 @@ func (q *Queries) GetUserByUsername(ctx context.Context, username string) (GetUs
|
||||
return i, err
|
||||
}
|
||||
|
||||
const getUserPassword = `-- name: GetUserPassword :one
|
||||
SELECT
|
||||
password
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) GetUserPassword(ctx context.Context, id int64) (string, error) {
|
||||
row := q.queryRow(ctx, q.getUserPasswordStmt, getUserPassword, id)
|
||||
var password string
|
||||
err := row.Scan(&password)
|
||||
return password, err
|
||||
}
|
||||
|
||||
const listUsers = `-- name: ListUsers :many
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
email,
|
||||
is_admin,
|
||||
otp,
|
||||
otp_expiry,
|
||||
last_login,
|
||||
created_at,
|
||||
updated_at
|
||||
id, username, password, email, is_admin, otp, otp_expiry, last_login, created_at, updated_at
|
||||
FROM
|
||||
users
|
||||
ORDER BY
|
||||
username
|
||||
LIMIT
|
||||
?
|
||||
OFFSET
|
||||
?
|
||||
`
|
||||
|
||||
type ListUsersRow struct {
|
||||
ID int64 `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Email *string `json:"email"`
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
Otp *string `json:"otp"`
|
||||
OtpExpiry *time.Time `json:"otpExpiry"`
|
||||
LastLogin *time.Time `json:"lastLogin"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
type ListUsersParams struct {
|
||||
Limit int64 `json:"limit"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListUsers(ctx context.Context) ([]ListUsersRow, error) {
|
||||
rows, err := q.query(ctx, q.listUsersStmt, listUsers)
|
||||
func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error) {
|
||||
rows, err := q.query(ctx, q.listUsersStmt, listUsers, arg.Limit, arg.Offset)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
var items []ListUsersRow
|
||||
var items []User
|
||||
for rows.Next() {
|
||||
var i ListUsersRow
|
||||
var i User
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.Username,
|
||||
&i.Password,
|
||||
&i.Email,
|
||||
&i.IsAdmin,
|
||||
&i.Otp,
|
||||
@@ -263,7 +205,7 @@ func (q *Queries) ListUsers(ctx context.Context) ([]ListUsersRow, error) {
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateUser = `-- name: UpdateUser :exec
|
||||
const updateUser = `-- name: UpdateUser :one
|
||||
UPDATE users
|
||||
SET
|
||||
username = ?,
|
||||
@@ -271,24 +213,37 @@ SET
|
||||
is_admin = ?,
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
WHERE
|
||||
id = ?
|
||||
id = ? RETURNING id, username, password, email, is_admin, otp, otp_expiry, last_login, created_at, updated_at
|
||||
`
|
||||
|
||||
type UpdateUserParams struct {
|
||||
Username string `json:"username"`
|
||||
Email *string `json:"email"`
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
ID int64 `json:"id"`
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error {
|
||||
_, err := q.exec(ctx, q.updateUserStmt, updateUser,
|
||||
func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error) {
|
||||
row := q.queryRow(ctx, q.updateUserStmt, updateUser,
|
||||
arg.Username,
|
||||
arg.Email,
|
||||
arg.IsAdmin,
|
||||
arg.ID,
|
||||
)
|
||||
return err
|
||||
var i User
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.Username,
|
||||
&i.Password,
|
||||
&i.Email,
|
||||
&i.IsAdmin,
|
||||
&i.Otp,
|
||||
&i.OtpExpiry,
|
||||
&i.LastLogin,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const updateUserLastLogin = `-- name: UpdateUserLastLogin :exec
|
||||
@@ -299,7 +254,7 @@ WHERE
|
||||
id = ?
|
||||
`
|
||||
|
||||
func (q *Queries) UpdateUserLastLogin(ctx context.Context, id int64) error {
|
||||
func (q *Queries) UpdateUserLastLogin(ctx context.Context, id string) error {
|
||||
_, err := q.exec(ctx, q.updateUserLastLoginStmt, updateUserLastLogin, id)
|
||||
return err
|
||||
}
|
||||
@@ -316,7 +271,7 @@ WHERE
|
||||
|
||||
type UpdateUserPasswordParams struct {
|
||||
Password string `json:"password"`
|
||||
ID int64 `json:"id"`
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error {
|
||||
@@ -336,7 +291,7 @@ WHERE
|
||||
type UpdateUserResetTokenParams struct {
|
||||
Otp *string `json:"otp"`
|
||||
OtpExpiry *time.Time `json:"otpExpiry"`
|
||||
ID int64 `json:"id"`
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateUserResetToken(ctx context.Context, arg UpdateUserResetTokenParams) error {
|
||||
|
||||
@@ -3,7 +3,9 @@ package util
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/sha256"
|
||||
"crypto/tls"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"net"
|
||||
@@ -85,6 +87,11 @@ func GenerateOTP() (string, error) {
|
||||
return string(token), nil
|
||||
}
|
||||
|
||||
func HashOTP(otp string) string {
|
||||
sum := sha256.Sum256([]byte(otp))
|
||||
return hex.EncodeToString(sum[:])
|
||||
}
|
||||
|
||||
// IsValidURL checks if a URL is valid url string
|
||||
func IsValidURL(u string) bool {
|
||||
// If no scheme is provided, prepend "http://"
|
||||
|
||||
@@ -1,418 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc (unknown)
|
||||
// source: agent/v1/agent.proto
|
||||
|
||||
package agentv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Container struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
Image string `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"`
|
||||
Portmap map[int32]int32 `protobuf:"bytes,5,rep,name=portmap,proto3" json:"portmap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
||||
Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Created *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created,proto3" json:"created,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Container) Reset() {
|
||||
*x = Container{}
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Container) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Container) ProtoMessage() {}
|
||||
|
||||
func (x *Container) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Container.ProtoReflect.Descriptor instead.
|
||||
func (*Container) Descriptor() ([]byte, []int) {
|
||||
return file_agent_v1_agent_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Container) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetLabels() map[string]string {
|
||||
if x != nil {
|
||||
return x.Labels
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Container) GetImage() string {
|
||||
if x != nil {
|
||||
return x.Image
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetPortmap() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Portmap
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Container) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetCreated() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Created
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetContainerRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||||
PublicIp string `protobuf:"bytes,2,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"`
|
||||
PrivateIps []string `protobuf:"bytes,3,rep,name=private_ips,json=privateIps,proto3" json:"private_ips,omitempty"`
|
||||
Containers []*Container `protobuf:"bytes,4,rep,name=containers,proto3" json:"containers,omitempty"`
|
||||
Updated *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated,proto3" json:"updated,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) Reset() {
|
||||
*x = GetContainerRequest{}
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetContainerRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetContainerRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetContainerRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetContainerRequest) Descriptor() ([]byte, []int) {
|
||||
return file_agent_v1_agent_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetHostname() string {
|
||||
if x != nil {
|
||||
return x.Hostname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetPublicIp() string {
|
||||
if x != nil {
|
||||
return x.PublicIp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetPrivateIps() []string {
|
||||
if x != nil {
|
||||
return x.PrivateIps
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetContainers() []*Container {
|
||||
if x != nil {
|
||||
return x.Containers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetUpdated() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Updated
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetContainerResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetContainerResponse) Reset() {
|
||||
*x = GetContainerResponse{}
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetContainerResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetContainerResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetContainerResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetContainerResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetContainerResponse) Descriptor() ([]byte, []int) {
|
||||
return file_agent_v1_agent_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
type HealthCheckRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *HealthCheckRequest) Reset() {
|
||||
*x = HealthCheckRequest{}
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *HealthCheckRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HealthCheckRequest) ProtoMessage() {}
|
||||
|
||||
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
|
||||
func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
|
||||
return file_agent_v1_agent_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type HealthCheckResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
|
||||
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) Reset() {
|
||||
*x = HealthCheckResponse{}
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HealthCheckResponse) ProtoMessage() {}
|
||||
|
||||
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agent_v1_agent_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
|
||||
func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
|
||||
return file_agent_v1_agent_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) GetOk() bool {
|
||||
if x != nil {
|
||||
return x.Ok
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_agent_v1_agent_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_agent_v1_agent_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x14agent/v1/agent.proto\x12\bagent.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xff\x02\n" +
|
||||
"\tContainer\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x127\n" +
|
||||
"\x06labels\x18\x03 \x03(\v2\x1f.agent.v1.Container.LabelsEntryR\x06labels\x12\x14\n" +
|
||||
"\x05image\x18\x04 \x01(\tR\x05image\x12:\n" +
|
||||
"\aportmap\x18\x05 \x03(\v2 .agent.v1.Container.PortmapEntryR\aportmap\x12\x16\n" +
|
||||
"\x06status\x18\x06 \x01(\tR\x06status\x124\n" +
|
||||
"\acreated\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\acreated\x1a9\n" +
|
||||
"\vLabelsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a:\n" +
|
||||
"\fPortmapEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\"\xda\x01\n" +
|
||||
"\x13GetContainerRequest\x12\x1a\n" +
|
||||
"\bhostname\x18\x01 \x01(\tR\bhostname\x12\x1b\n" +
|
||||
"\tpublic_ip\x18\x02 \x01(\tR\bpublicIp\x12\x1f\n" +
|
||||
"\vprivate_ips\x18\x03 \x03(\tR\n" +
|
||||
"privateIps\x123\n" +
|
||||
"\n" +
|
||||
"containers\x18\x04 \x03(\v2\x13.agent.v1.ContainerR\n" +
|
||||
"containers\x124\n" +
|
||||
"\aupdated\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\aupdated\"\x16\n" +
|
||||
"\x14GetContainerResponse\"\x14\n" +
|
||||
"\x12HealthCheckRequest\";\n" +
|
||||
"\x13HealthCheckResponse\x12\x0e\n" +
|
||||
"\x02ok\x18\x01 \x01(\bR\x02ok\x12\x14\n" +
|
||||
"\x05token\x18\x02 \x01(\tR\x05token2\xa9\x01\n" +
|
||||
"\fAgentService\x12M\n" +
|
||||
"\fGetContainer\x12\x1d.agent.v1.GetContainerRequest\x1a\x1e.agent.v1.GetContainerResponse\x12J\n" +
|
||||
"\vHealthCheck\x12\x1c.agent.v1.HealthCheckRequest\x1a\x1d.agent.v1.HealthCheckResponseB\x96\x01\n" +
|
||||
"\fcom.agent.v1B\n" +
|
||||
"AgentProtoP\x01Z9github.com/mizuchilabs/mantrae/proto/gen/agent/v1;agentv1\xa2\x02\x03AXX\xaa\x02\bAgent.V1\xca\x02\bAgent\\V1\xe2\x02\x14Agent\\V1\\GPBMetadata\xea\x02\tAgent::V1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_agent_v1_agent_proto_rawDescOnce sync.Once
|
||||
file_agent_v1_agent_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_agent_v1_agent_proto_rawDescGZIP() []byte {
|
||||
file_agent_v1_agent_proto_rawDescOnce.Do(func() {
|
||||
file_agent_v1_agent_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_agent_v1_agent_proto_rawDesc), len(file_agent_v1_agent_proto_rawDesc)))
|
||||
})
|
||||
return file_agent_v1_agent_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_agent_v1_agent_proto_goTypes = []any{
|
||||
(*Container)(nil), // 0: agent.v1.Container
|
||||
(*GetContainerRequest)(nil), // 1: agent.v1.GetContainerRequest
|
||||
(*GetContainerResponse)(nil), // 2: agent.v1.GetContainerResponse
|
||||
(*HealthCheckRequest)(nil), // 3: agent.v1.HealthCheckRequest
|
||||
(*HealthCheckResponse)(nil), // 4: agent.v1.HealthCheckResponse
|
||||
nil, // 5: agent.v1.Container.LabelsEntry
|
||||
nil, // 6: agent.v1.Container.PortmapEntry
|
||||
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
|
||||
}
|
||||
var file_agent_v1_agent_proto_depIdxs = []int32{
|
||||
5, // 0: agent.v1.Container.labels:type_name -> agent.v1.Container.LabelsEntry
|
||||
6, // 1: agent.v1.Container.portmap:type_name -> agent.v1.Container.PortmapEntry
|
||||
7, // 2: agent.v1.Container.created:type_name -> google.protobuf.Timestamp
|
||||
0, // 3: agent.v1.GetContainerRequest.containers:type_name -> agent.v1.Container
|
||||
7, // 4: agent.v1.GetContainerRequest.updated:type_name -> google.protobuf.Timestamp
|
||||
1, // 5: agent.v1.AgentService.GetContainer:input_type -> agent.v1.GetContainerRequest
|
||||
3, // 6: agent.v1.AgentService.HealthCheck:input_type -> agent.v1.HealthCheckRequest
|
||||
2, // 7: agent.v1.AgentService.GetContainer:output_type -> agent.v1.GetContainerResponse
|
||||
4, // 8: agent.v1.AgentService.HealthCheck:output_type -> agent.v1.HealthCheckResponse
|
||||
7, // [7:9] is the sub-list for method output_type
|
||||
5, // [5:7] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_agent_v1_agent_proto_init() }
|
||||
func file_agent_v1_agent_proto_init() {
|
||||
if File_agent_v1_agent_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_agent_v1_agent_proto_rawDesc), len(file_agent_v1_agent_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_agent_v1_agent_proto_goTypes,
|
||||
DependencyIndexes: file_agent_v1_agent_proto_depIdxs,
|
||||
MessageInfos: file_agent_v1_agent_proto_msgTypes,
|
||||
}.Build()
|
||||
File_agent_v1_agent_proto = out.File
|
||||
file_agent_v1_agent_proto_goTypes = nil
|
||||
file_agent_v1_agent_proto_depIdxs = nil
|
||||
}
|
||||
456
proto/gen/mantrae/v1/agent.pb.go
Normal file
456
proto/gen/mantrae/v1/agent.pb.go
Normal file
@@ -0,0 +1,456 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: mantrae/v1/agent.proto
|
||||
|
||||
package mantraev1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Container struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
Image string `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"`
|
||||
Portmap map[int32]int32 `protobuf:"bytes,5,rep,name=portmap,proto3" json:"portmap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
||||
Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Created *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created,proto3" json:"created,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Container) Reset() {
|
||||
*x = Container{}
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Container) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Container) ProtoMessage() {}
|
||||
|
||||
func (x *Container) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Container.ProtoReflect.Descriptor instead.
|
||||
func (*Container) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_agent_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Container) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetLabels() map[string]string {
|
||||
if x != nil {
|
||||
return x.Labels
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Container) GetImage() string {
|
||||
if x != nil {
|
||||
return x.Image
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetPortmap() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Portmap
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Container) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetCreated() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Created
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetContainerRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||||
PublicIp string `protobuf:"bytes,2,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"`
|
||||
PrivateIps []string `protobuf:"bytes,3,rep,name=private_ips,json=privateIps,proto3" json:"private_ips,omitempty"`
|
||||
Containers []*Container `protobuf:"bytes,4,rep,name=containers,proto3" json:"containers,omitempty"`
|
||||
Updated *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated,proto3" json:"updated,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) Reset() {
|
||||
*x = GetContainerRequest{}
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetContainerRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetContainerRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetContainerRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetContainerRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_agent_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetHostname() string {
|
||||
if x != nil {
|
||||
return x.Hostname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetPublicIp() string {
|
||||
if x != nil {
|
||||
return x.PublicIp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetPrivateIps() []string {
|
||||
if x != nil {
|
||||
return x.PrivateIps
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetContainers() []*Container {
|
||||
if x != nil {
|
||||
return x.Containers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetContainerRequest) GetUpdated() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Updated
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetContainerResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetContainerResponse) Reset() {
|
||||
*x = GetContainerResponse{}
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetContainerResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetContainerResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetContainerResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetContainerResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetContainerResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_agent_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
type HealthCheckRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *HealthCheckRequest) Reset() {
|
||||
*x = HealthCheckRequest{}
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *HealthCheckRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HealthCheckRequest) ProtoMessage() {}
|
||||
|
||||
func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
|
||||
func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_agent_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type HealthCheckResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
|
||||
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) Reset() {
|
||||
*x = HealthCheckResponse{}
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*HealthCheckResponse) ProtoMessage() {}
|
||||
|
||||
func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_agent_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
|
||||
func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_agent_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) GetOk() bool {
|
||||
if x != nil {
|
||||
return x.Ok
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *HealthCheckResponse) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_mantrae_v1_agent_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_mantrae_v1_agent_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x16, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65,
|
||||
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x03, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
|
||||
0x6e, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c,
|
||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x4c,
|
||||
0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65,
|
||||
0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x6d, 0x61, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
||||
0x2e, 0x50, 0x6f, 0x72, 0x74, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70,
|
||||
0x6f, 0x72, 0x74, 0x6d, 0x61, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34,
|
||||
0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x64, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
|
||||
0x3a, 0x0a, 0x0c, 0x50, 0x6f, 0x72, 0x74, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdc, 0x01, 0x0a, 0x13,
|
||||
0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x1b, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x1f, 0x0a, 0x0b,
|
||||
0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x70, 0x73, 0x12, 0x35, 0x0a,
|
||||
0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
|
||||
0x6e, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65,
|
||||
0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c,
|
||||
0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xb1, 0x01, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
|
||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x48, 0x65, 0x61,
|
||||
0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63,
|
||||
0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa4, 0x01, 0x0a, 0x0e, 0x63, 0x6f,
|
||||
0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x41, 0x67,
|
||||
0x65, 0x6e, 0x74, 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 (
|
||||
file_mantrae_v1_agent_proto_rawDescOnce sync.Once
|
||||
file_mantrae_v1_agent_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_mantrae_v1_agent_proto_rawDescGZIP() []byte {
|
||||
file_mantrae_v1_agent_proto_rawDescOnce.Do(func() {
|
||||
file_mantrae_v1_agent_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mantrae_v1_agent_proto_rawDesc), len(file_mantrae_v1_agent_proto_rawDesc)))
|
||||
})
|
||||
return file_mantrae_v1_agent_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mantrae_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_mantrae_v1_agent_proto_goTypes = []any{
|
||||
(*Container)(nil), // 0: mantrae.v1.Container
|
||||
(*GetContainerRequest)(nil), // 1: mantrae.v1.GetContainerRequest
|
||||
(*GetContainerResponse)(nil), // 2: mantrae.v1.GetContainerResponse
|
||||
(*HealthCheckRequest)(nil), // 3: mantrae.v1.HealthCheckRequest
|
||||
(*HealthCheckResponse)(nil), // 4: mantrae.v1.HealthCheckResponse
|
||||
nil, // 5: mantrae.v1.Container.LabelsEntry
|
||||
nil, // 6: mantrae.v1.Container.PortmapEntry
|
||||
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
|
||||
}
|
||||
var file_mantrae_v1_agent_proto_depIdxs = []int32{
|
||||
5, // 0: mantrae.v1.Container.labels:type_name -> mantrae.v1.Container.LabelsEntry
|
||||
6, // 1: mantrae.v1.Container.portmap:type_name -> mantrae.v1.Container.PortmapEntry
|
||||
7, // 2: mantrae.v1.Container.created:type_name -> google.protobuf.Timestamp
|
||||
0, // 3: mantrae.v1.GetContainerRequest.containers:type_name -> mantrae.v1.Container
|
||||
7, // 4: mantrae.v1.GetContainerRequest.updated:type_name -> google.protobuf.Timestamp
|
||||
1, // 5: mantrae.v1.AgentService.GetContainer:input_type -> mantrae.v1.GetContainerRequest
|
||||
3, // 6: mantrae.v1.AgentService.HealthCheck:input_type -> mantrae.v1.HealthCheckRequest
|
||||
2, // 7: mantrae.v1.AgentService.GetContainer:output_type -> mantrae.v1.GetContainerResponse
|
||||
4, // 8: mantrae.v1.AgentService.HealthCheck:output_type -> mantrae.v1.HealthCheckResponse
|
||||
7, // [7:9] is the sub-list for method output_type
|
||||
5, // [5:7] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_mantrae_v1_agent_proto_init() }
|
||||
func file_mantrae_v1_agent_proto_init() {
|
||||
if File_mantrae_v1_agent_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_mantrae_v1_agent_proto_rawDesc), len(file_mantrae_v1_agent_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_mantrae_v1_agent_proto_goTypes,
|
||||
DependencyIndexes: file_mantrae_v1_agent_proto_depIdxs,
|
||||
MessageInfos: file_mantrae_v1_agent_proto_msgTypes,
|
||||
}.Build()
|
||||
File_mantrae_v1_agent_proto = out.File
|
||||
file_mantrae_v1_agent_proto_goTypes = nil
|
||||
file_mantrae_v1_agent_proto_depIdxs = nil
|
||||
}
|
||||
788
proto/gen/mantrae/v1/entry_point.pb.go
Normal file
788
proto/gen/mantrae/v1/entry_point.pb.go
Normal file
@@ -0,0 +1,788 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: mantrae/v1/entry_point.proto
|
||||
|
||||
package mantraev1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type EntryPoint struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
|
||||
IsDefault bool `protobuf:"varint,4,opt,name=is_default,json=isDefault,proto3" json:"is_default,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *EntryPoint) Reset() {
|
||||
*x = EntryPoint{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *EntryPoint) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EntryPoint) ProtoMessage() {}
|
||||
|
||||
func (x *EntryPoint) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use EntryPoint.ProtoReflect.Descriptor instead.
|
||||
func (*EntryPoint) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *EntryPoint) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EntryPoint) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EntryPoint) GetAddress() string {
|
||||
if x != nil {
|
||||
return x.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EntryPoint) GetIsDefault() bool {
|
||||
if x != nil {
|
||||
return x.IsDefault
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *EntryPoint) GetCreatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *EntryPoint) GetUpdatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetEntryPointRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetEntryPointRequest) Reset() {
|
||||
*x = GetEntryPointRequest{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetEntryPointRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetEntryPointRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetEntryPointRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetEntryPointRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetEntryPointRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetEntryPointRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetEntryPointResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
EntryPoint *EntryPoint `protobuf:"bytes,1,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetEntryPointResponse) Reset() {
|
||||
*x = GetEntryPointResponse{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetEntryPointResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetEntryPointResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetEntryPointResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetEntryPointResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetEntryPointResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetEntryPointResponse) GetEntryPoint() *EntryPoint {
|
||||
if x != nil {
|
||||
return x.EntryPoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CreateEntryPointRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
|
||||
IsDefault bool `protobuf:"varint,3,opt,name=is_default,json=isDefault,proto3" json:"is_default,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateEntryPointRequest) Reset() {
|
||||
*x = CreateEntryPointRequest{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateEntryPointRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateEntryPointRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateEntryPointRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateEntryPointRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateEntryPointRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *CreateEntryPointRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateEntryPointRequest) GetAddress() string {
|
||||
if x != nil {
|
||||
return x.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateEntryPointRequest) GetIsDefault() bool {
|
||||
if x != nil {
|
||||
return x.IsDefault
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type CreateEntryPointResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
EntryPoint *EntryPoint `protobuf:"bytes,1,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateEntryPointResponse) Reset() {
|
||||
*x = CreateEntryPointResponse{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateEntryPointResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateEntryPointResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateEntryPointResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateEntryPointResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreateEntryPointResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *CreateEntryPointResponse) GetEntryPoint() *EntryPoint {
|
||||
if x != nil {
|
||||
return x.EntryPoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UpdateEntryPointRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
|
||||
IsDefault bool `protobuf:"varint,4,opt,name=is_default,json=isDefault,proto3" json:"is_default,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateEntryPointRequest) Reset() {
|
||||
*x = UpdateEntryPointRequest{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateEntryPointRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateEntryPointRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateEntryPointRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateEntryPointRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateEntryPointRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *UpdateEntryPointRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateEntryPointRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateEntryPointRequest) GetAddress() string {
|
||||
if x != nil {
|
||||
return x.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateEntryPointRequest) GetIsDefault() bool {
|
||||
if x != nil {
|
||||
return x.IsDefault
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type UpdateEntryPointResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
EntryPoint *EntryPoint `protobuf:"bytes,1,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateEntryPointResponse) Reset() {
|
||||
*x = UpdateEntryPointResponse{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateEntryPointResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateEntryPointResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateEntryPointResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateEntryPointResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateEntryPointResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *UpdateEntryPointResponse) GetEntryPoint() *EntryPoint {
|
||||
if x != nil {
|
||||
return x.EntryPoint
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteEntryPointRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteEntryPointRequest) Reset() {
|
||||
*x = DeleteEntryPointRequest{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteEntryPointRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteEntryPointRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteEntryPointRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteEntryPointRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteEntryPointRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *DeleteEntryPointRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeleteEntryPointResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteEntryPointResponse) Reset() {
|
||||
*x = DeleteEntryPointResponse{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteEntryPointResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteEntryPointResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteEntryPointResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteEntryPointResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteEntryPointResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type ListEntryPointsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Limit *int64 `protobuf:"varint,1,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
|
||||
Offset *int64 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListEntryPointsRequest) Reset() {
|
||||
*x = ListEntryPointsRequest{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListEntryPointsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListEntryPointsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListEntryPointsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListEntryPointsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListEntryPointsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *ListEntryPointsRequest) GetLimit() int64 {
|
||||
if x != nil && x.Limit != nil {
|
||||
return *x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListEntryPointsRequest) GetOffset() int64 {
|
||||
if x != nil && x.Offset != nil {
|
||||
return *x.Offset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListEntryPointsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
EntryPoints []*EntryPoint `protobuf:"bytes,1,rep,name=entry_points,json=entryPoints,proto3" json:"entry_points,omitempty"`
|
||||
TotalCount int64 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListEntryPointsResponse) Reset() {
|
||||
*x = ListEntryPointsResponse{}
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListEntryPointsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListEntryPointsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListEntryPointsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_entry_point_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListEntryPointsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListEntryPointsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_entry_point_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *ListEntryPointsResponse) GetEntryPoints() []*EntryPoint {
|
||||
if x != nil {
|
||||
return x.EntryPoints
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListEntryPointsResponse) GetTotalCount() int64 {
|
||||
if x != nil {
|
||||
return x.TotalCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_mantrae_v1_entry_point_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_mantrae_v1_entry_point_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x1c, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x01, 0x0a, 0x0a,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x64,
|
||||
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73,
|
||||
0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
|
||||
0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x26, 0x0a,
|
||||
0x14, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37,
|
||||
0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x66, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
||||
0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22,
|
||||
0x53, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f,
|
||||
0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x65,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50,
|
||||
0x6f, 0x69, 0x6e, 0x74, 0x22, 0x76, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x69, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x53, 0x0a, 0x18,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e,
|
||||
0x74, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1a, 0x0a, 0x18,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x65, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a,
|
||||
0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52,
|
||||
0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22,
|
||||
0x75, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e,
|
||||
0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x65, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50,
|
||||
0x6f, 0x69, 0x6e, 0x74, 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, 0x32, 0xec, 0x03, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x0d,
|
||||
0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x20, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x5d, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 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, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e,
|
||||
0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 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, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 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, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f,
|
||||
0x69, 0x6e, 0x74, 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, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 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, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50,
|
||||
0x6f, 0x69, 0x6e, 0x74, 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 (
|
||||
file_mantrae_v1_entry_point_proto_rawDescOnce sync.Once
|
||||
file_mantrae_v1_entry_point_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_mantrae_v1_entry_point_proto_rawDescGZIP() []byte {
|
||||
file_mantrae_v1_entry_point_proto_rawDescOnce.Do(func() {
|
||||
file_mantrae_v1_entry_point_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mantrae_v1_entry_point_proto_rawDesc), len(file_mantrae_v1_entry_point_proto_rawDesc)))
|
||||
})
|
||||
return file_mantrae_v1_entry_point_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mantrae_v1_entry_point_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_mantrae_v1_entry_point_proto_goTypes = []any{
|
||||
(*EntryPoint)(nil), // 0: mantrae.v1.EntryPoint
|
||||
(*GetEntryPointRequest)(nil), // 1: mantrae.v1.GetEntryPointRequest
|
||||
(*GetEntryPointResponse)(nil), // 2: mantrae.v1.GetEntryPointResponse
|
||||
(*CreateEntryPointRequest)(nil), // 3: mantrae.v1.CreateEntryPointRequest
|
||||
(*CreateEntryPointResponse)(nil), // 4: mantrae.v1.CreateEntryPointResponse
|
||||
(*UpdateEntryPointRequest)(nil), // 5: mantrae.v1.UpdateEntryPointRequest
|
||||
(*UpdateEntryPointResponse)(nil), // 6: mantrae.v1.UpdateEntryPointResponse
|
||||
(*DeleteEntryPointRequest)(nil), // 7: mantrae.v1.DeleteEntryPointRequest
|
||||
(*DeleteEntryPointResponse)(nil), // 8: mantrae.v1.DeleteEntryPointResponse
|
||||
(*ListEntryPointsRequest)(nil), // 9: mantrae.v1.ListEntryPointsRequest
|
||||
(*ListEntryPointsResponse)(nil), // 10: mantrae.v1.ListEntryPointsResponse
|
||||
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
|
||||
}
|
||||
var file_mantrae_v1_entry_point_proto_depIdxs = []int32{
|
||||
11, // 0: mantrae.v1.EntryPoint.created_at:type_name -> google.protobuf.Timestamp
|
||||
11, // 1: mantrae.v1.EntryPoint.updated_at:type_name -> google.protobuf.Timestamp
|
||||
0, // 2: mantrae.v1.GetEntryPointResponse.entry_point:type_name -> mantrae.v1.EntryPoint
|
||||
0, // 3: mantrae.v1.CreateEntryPointResponse.entry_point:type_name -> mantrae.v1.EntryPoint
|
||||
0, // 4: mantrae.v1.UpdateEntryPointResponse.entry_point:type_name -> mantrae.v1.EntryPoint
|
||||
0, // 5: mantrae.v1.ListEntryPointsResponse.entry_points:type_name -> mantrae.v1.EntryPoint
|
||||
1, // 6: mantrae.v1.EntryPointService.GetEntryPoint:input_type -> mantrae.v1.GetEntryPointRequest
|
||||
3, // 7: mantrae.v1.EntryPointService.CreateEntryPoint:input_type -> mantrae.v1.CreateEntryPointRequest
|
||||
5, // 8: mantrae.v1.EntryPointService.UpdateEntryPoint:input_type -> mantrae.v1.UpdateEntryPointRequest
|
||||
7, // 9: mantrae.v1.EntryPointService.DeleteEntryPoint:input_type -> mantrae.v1.DeleteEntryPointRequest
|
||||
9, // 10: mantrae.v1.EntryPointService.ListEntryPoints:input_type -> mantrae.v1.ListEntryPointsRequest
|
||||
2, // 11: mantrae.v1.EntryPointService.GetEntryPoint:output_type -> mantrae.v1.GetEntryPointResponse
|
||||
4, // 12: mantrae.v1.EntryPointService.CreateEntryPoint:output_type -> mantrae.v1.CreateEntryPointResponse
|
||||
6, // 13: mantrae.v1.EntryPointService.UpdateEntryPoint:output_type -> mantrae.v1.UpdateEntryPointResponse
|
||||
8, // 14: mantrae.v1.EntryPointService.DeleteEntryPoint:output_type -> mantrae.v1.DeleteEntryPointResponse
|
||||
10, // 15: mantrae.v1.EntryPointService.ListEntryPoints:output_type -> mantrae.v1.ListEntryPointsResponse
|
||||
11, // [11:16] is the sub-list for method output_type
|
||||
6, // [6:11] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_mantrae_v1_entry_point_proto_init() }
|
||||
func file_mantrae_v1_entry_point_proto_init() {
|
||||
if File_mantrae_v1_entry_point_proto != nil {
|
||||
return
|
||||
}
|
||||
file_mantrae_v1_entry_point_proto_msgTypes[9].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_mantrae_v1_entry_point_proto_rawDesc), len(file_mantrae_v1_entry_point_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_mantrae_v1_entry_point_proto_goTypes,
|
||||
DependencyIndexes: file_mantrae_v1_entry_point_proto_depIdxs,
|
||||
MessageInfos: file_mantrae_v1_entry_point_proto_msgTypes,
|
||||
}.Build()
|
||||
File_mantrae_v1_entry_point_proto = out.File
|
||||
file_mantrae_v1_entry_point_proto_goTypes = nil
|
||||
file_mantrae_v1_entry_point_proto_depIdxs = nil
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: agent/v1/agent.proto
|
||||
// Source: mantrae/v1/agent.proto
|
||||
|
||||
package agentv1connect
|
||||
package mantraev1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "github.com/mizuchilabs/mantrae/proto/gen/agent/v1"
|
||||
v1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
@@ -22,7 +22,7 @@ const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// AgentServiceName is the fully-qualified name of the AgentService service.
|
||||
AgentServiceName = "agent.v1.AgentService"
|
||||
AgentServiceName = "mantrae.v1.AgentService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
@@ -35,19 +35,19 @@ const (
|
||||
const (
|
||||
// AgentServiceGetContainerProcedure is the fully-qualified name of the AgentService's GetContainer
|
||||
// RPC.
|
||||
AgentServiceGetContainerProcedure = "/agent.v1.AgentService/GetContainer"
|
||||
AgentServiceGetContainerProcedure = "/mantrae.v1.AgentService/GetContainer"
|
||||
// AgentServiceHealthCheckProcedure is the fully-qualified name of the AgentService's HealthCheck
|
||||
// RPC.
|
||||
AgentServiceHealthCheckProcedure = "/agent.v1.AgentService/HealthCheck"
|
||||
AgentServiceHealthCheckProcedure = "/mantrae.v1.AgentService/HealthCheck"
|
||||
)
|
||||
|
||||
// AgentServiceClient is a client for the agent.v1.AgentService service.
|
||||
// AgentServiceClient is a client for the mantrae.v1.AgentService service.
|
||||
type AgentServiceClient interface {
|
||||
GetContainer(context.Context, *connect.Request[v1.GetContainerRequest]) (*connect.Response[v1.GetContainerResponse], error)
|
||||
HealthCheck(context.Context, *connect.Request[v1.HealthCheckRequest]) (*connect.Response[v1.HealthCheckResponse], error)
|
||||
}
|
||||
|
||||
// NewAgentServiceClient constructs a client for the agent.v1.AgentService service. By default, it
|
||||
// NewAgentServiceClient constructs a client for the mantrae.v1.AgentService service. By default, it
|
||||
// uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
|
||||
// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
|
||||
// connect.WithGRPCWeb() options.
|
||||
@@ -56,7 +56,7 @@ type AgentServiceClient interface {
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewAgentServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AgentServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
agentServiceMethods := v1.File_agent_v1_agent_proto.Services().ByName("AgentService").Methods()
|
||||
agentServiceMethods := v1.File_mantrae_v1_agent_proto.Services().ByName("AgentService").Methods()
|
||||
return &agentServiceClient{
|
||||
getContainer: connect.NewClient[v1.GetContainerRequest, v1.GetContainerResponse](
|
||||
httpClient,
|
||||
@@ -79,17 +79,17 @@ type agentServiceClient struct {
|
||||
healthCheck *connect.Client[v1.HealthCheckRequest, v1.HealthCheckResponse]
|
||||
}
|
||||
|
||||
// GetContainer calls agent.v1.AgentService.GetContainer.
|
||||
// GetContainer calls mantrae.v1.AgentService.GetContainer.
|
||||
func (c *agentServiceClient) GetContainer(ctx context.Context, req *connect.Request[v1.GetContainerRequest]) (*connect.Response[v1.GetContainerResponse], error) {
|
||||
return c.getContainer.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// HealthCheck calls agent.v1.AgentService.HealthCheck.
|
||||
// HealthCheck calls mantrae.v1.AgentService.HealthCheck.
|
||||
func (c *agentServiceClient) HealthCheck(ctx context.Context, req *connect.Request[v1.HealthCheckRequest]) (*connect.Response[v1.HealthCheckResponse], error) {
|
||||
return c.healthCheck.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// AgentServiceHandler is an implementation of the agent.v1.AgentService service.
|
||||
// AgentServiceHandler is an implementation of the mantrae.v1.AgentService service.
|
||||
type AgentServiceHandler interface {
|
||||
GetContainer(context.Context, *connect.Request[v1.GetContainerRequest]) (*connect.Response[v1.GetContainerResponse], error)
|
||||
HealthCheck(context.Context, *connect.Request[v1.HealthCheckRequest]) (*connect.Response[v1.HealthCheckResponse], error)
|
||||
@@ -101,7 +101,7 @@ type AgentServiceHandler interface {
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewAgentServiceHandler(svc AgentServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
agentServiceMethods := v1.File_agent_v1_agent_proto.Services().ByName("AgentService").Methods()
|
||||
agentServiceMethods := v1.File_mantrae_v1_agent_proto.Services().ByName("AgentService").Methods()
|
||||
agentServiceGetContainerHandler := connect.NewUnaryHandler(
|
||||
AgentServiceGetContainerProcedure,
|
||||
svc.GetContainer,
|
||||
@@ -114,7 +114,7 @@ func NewAgentServiceHandler(svc AgentServiceHandler, opts ...connect.HandlerOpti
|
||||
connect.WithSchema(agentServiceMethods.ByName("HealthCheck")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/agent.v1.AgentService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
return "/mantrae.v1.AgentService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case AgentServiceGetContainerProcedure:
|
||||
agentServiceGetContainerHandler.ServeHTTP(w, r)
|
||||
@@ -130,9 +130,9 @@ func NewAgentServiceHandler(svc AgentServiceHandler, opts ...connect.HandlerOpti
|
||||
type UnimplementedAgentServiceHandler struct{}
|
||||
|
||||
func (UnimplementedAgentServiceHandler) GetContainer(context.Context, *connect.Request[v1.GetContainerRequest]) (*connect.Response[v1.GetContainerResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("agent.v1.AgentService.GetContainer is not implemented"))
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.AgentService.GetContainer is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedAgentServiceHandler) HealthCheck(context.Context, *connect.Request[v1.HealthCheckRequest]) (*connect.Response[v1.HealthCheckResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("agent.v1.AgentService.HealthCheck is not implemented"))
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.AgentService.HealthCheck is not implemented"))
|
||||
}
|
||||
229
proto/gen/mantrae/v1/mantraev1connect/entry_point.connect.go
Normal file
229
proto/gen/mantrae/v1/mantraev1connect/entry_point.connect.go
Normal file
@@ -0,0 +1,229 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: mantrae/v1/entry_point.proto
|
||||
|
||||
package mantraev1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// EntryPointServiceName is the fully-qualified name of the EntryPointService service.
|
||||
EntryPointServiceName = "mantrae.v1.EntryPointService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// EntryPointServiceGetEntryPointProcedure is the fully-qualified name of the EntryPointService's
|
||||
// GetEntryPoint RPC.
|
||||
EntryPointServiceGetEntryPointProcedure = "/mantrae.v1.EntryPointService/GetEntryPoint"
|
||||
// EntryPointServiceCreateEntryPointProcedure is the fully-qualified name of the EntryPointService's
|
||||
// CreateEntryPoint RPC.
|
||||
EntryPointServiceCreateEntryPointProcedure = "/mantrae.v1.EntryPointService/CreateEntryPoint"
|
||||
// EntryPointServiceUpdateEntryPointProcedure is the fully-qualified name of the EntryPointService's
|
||||
// UpdateEntryPoint RPC.
|
||||
EntryPointServiceUpdateEntryPointProcedure = "/mantrae.v1.EntryPointService/UpdateEntryPoint"
|
||||
// EntryPointServiceDeleteEntryPointProcedure is the fully-qualified name of the EntryPointService's
|
||||
// DeleteEntryPoint RPC.
|
||||
EntryPointServiceDeleteEntryPointProcedure = "/mantrae.v1.EntryPointService/DeleteEntryPoint"
|
||||
// EntryPointServiceListEntryPointsProcedure is the fully-qualified name of the EntryPointService's
|
||||
// ListEntryPoints RPC.
|
||||
EntryPointServiceListEntryPointsProcedure = "/mantrae.v1.EntryPointService/ListEntryPoints"
|
||||
)
|
||||
|
||||
// EntryPointServiceClient is a client for the mantrae.v1.EntryPointService service.
|
||||
type EntryPointServiceClient interface {
|
||||
GetEntryPoint(context.Context, *connect.Request[v1.GetEntryPointRequest]) (*connect.Response[v1.GetEntryPointResponse], error)
|
||||
CreateEntryPoint(context.Context, *connect.Request[v1.CreateEntryPointRequest]) (*connect.Response[v1.CreateEntryPointResponse], error)
|
||||
UpdateEntryPoint(context.Context, *connect.Request[v1.UpdateEntryPointRequest]) (*connect.Response[v1.UpdateEntryPointResponse], error)
|
||||
DeleteEntryPoint(context.Context, *connect.Request[v1.DeleteEntryPointRequest]) (*connect.Response[v1.DeleteEntryPointResponse], error)
|
||||
ListEntryPoints(context.Context, *connect.Request[v1.ListEntryPointsRequest]) (*connect.Response[v1.ListEntryPointsResponse], error)
|
||||
}
|
||||
|
||||
// NewEntryPointServiceClient constructs a client for the mantrae.v1.EntryPointService service. By
|
||||
// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
|
||||
// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
|
||||
// connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewEntryPointServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) EntryPointServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
entryPointServiceMethods := v1.File_mantrae_v1_entry_point_proto.Services().ByName("EntryPointService").Methods()
|
||||
return &entryPointServiceClient{
|
||||
getEntryPoint: connect.NewClient[v1.GetEntryPointRequest, v1.GetEntryPointResponse](
|
||||
httpClient,
|
||||
baseURL+EntryPointServiceGetEntryPointProcedure,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("GetEntryPoint")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
createEntryPoint: connect.NewClient[v1.CreateEntryPointRequest, v1.CreateEntryPointResponse](
|
||||
httpClient,
|
||||
baseURL+EntryPointServiceCreateEntryPointProcedure,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("CreateEntryPoint")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
updateEntryPoint: connect.NewClient[v1.UpdateEntryPointRequest, v1.UpdateEntryPointResponse](
|
||||
httpClient,
|
||||
baseURL+EntryPointServiceUpdateEntryPointProcedure,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("UpdateEntryPoint")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
deleteEntryPoint: connect.NewClient[v1.DeleteEntryPointRequest, v1.DeleteEntryPointResponse](
|
||||
httpClient,
|
||||
baseURL+EntryPointServiceDeleteEntryPointProcedure,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("DeleteEntryPoint")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
listEntryPoints: connect.NewClient[v1.ListEntryPointsRequest, v1.ListEntryPointsResponse](
|
||||
httpClient,
|
||||
baseURL+EntryPointServiceListEntryPointsProcedure,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("ListEntryPoints")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// entryPointServiceClient implements EntryPointServiceClient.
|
||||
type entryPointServiceClient struct {
|
||||
getEntryPoint *connect.Client[v1.GetEntryPointRequest, v1.GetEntryPointResponse]
|
||||
createEntryPoint *connect.Client[v1.CreateEntryPointRequest, v1.CreateEntryPointResponse]
|
||||
updateEntryPoint *connect.Client[v1.UpdateEntryPointRequest, v1.UpdateEntryPointResponse]
|
||||
deleteEntryPoint *connect.Client[v1.DeleteEntryPointRequest, v1.DeleteEntryPointResponse]
|
||||
listEntryPoints *connect.Client[v1.ListEntryPointsRequest, v1.ListEntryPointsResponse]
|
||||
}
|
||||
|
||||
// GetEntryPoint calls mantrae.v1.EntryPointService.GetEntryPoint.
|
||||
func (c *entryPointServiceClient) GetEntryPoint(ctx context.Context, req *connect.Request[v1.GetEntryPointRequest]) (*connect.Response[v1.GetEntryPointResponse], error) {
|
||||
return c.getEntryPoint.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// CreateEntryPoint calls mantrae.v1.EntryPointService.CreateEntryPoint.
|
||||
func (c *entryPointServiceClient) CreateEntryPoint(ctx context.Context, req *connect.Request[v1.CreateEntryPointRequest]) (*connect.Response[v1.CreateEntryPointResponse], error) {
|
||||
return c.createEntryPoint.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// UpdateEntryPoint calls mantrae.v1.EntryPointService.UpdateEntryPoint.
|
||||
func (c *entryPointServiceClient) UpdateEntryPoint(ctx context.Context, req *connect.Request[v1.UpdateEntryPointRequest]) (*connect.Response[v1.UpdateEntryPointResponse], error) {
|
||||
return c.updateEntryPoint.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// DeleteEntryPoint calls mantrae.v1.EntryPointService.DeleteEntryPoint.
|
||||
func (c *entryPointServiceClient) DeleteEntryPoint(ctx context.Context, req *connect.Request[v1.DeleteEntryPointRequest]) (*connect.Response[v1.DeleteEntryPointResponse], error) {
|
||||
return c.deleteEntryPoint.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListEntryPoints calls mantrae.v1.EntryPointService.ListEntryPoints.
|
||||
func (c *entryPointServiceClient) ListEntryPoints(ctx context.Context, req *connect.Request[v1.ListEntryPointsRequest]) (*connect.Response[v1.ListEntryPointsResponse], error) {
|
||||
return c.listEntryPoints.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// EntryPointServiceHandler is an implementation of the mantrae.v1.EntryPointService service.
|
||||
type EntryPointServiceHandler interface {
|
||||
GetEntryPoint(context.Context, *connect.Request[v1.GetEntryPointRequest]) (*connect.Response[v1.GetEntryPointResponse], error)
|
||||
CreateEntryPoint(context.Context, *connect.Request[v1.CreateEntryPointRequest]) (*connect.Response[v1.CreateEntryPointResponse], error)
|
||||
UpdateEntryPoint(context.Context, *connect.Request[v1.UpdateEntryPointRequest]) (*connect.Response[v1.UpdateEntryPointResponse], error)
|
||||
DeleteEntryPoint(context.Context, *connect.Request[v1.DeleteEntryPointRequest]) (*connect.Response[v1.DeleteEntryPointResponse], error)
|
||||
ListEntryPoints(context.Context, *connect.Request[v1.ListEntryPointsRequest]) (*connect.Response[v1.ListEntryPointsResponse], error)
|
||||
}
|
||||
|
||||
// NewEntryPointServiceHandler builds an HTTP handler from the service implementation. It returns
|
||||
// the path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewEntryPointServiceHandler(svc EntryPointServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
entryPointServiceMethods := v1.File_mantrae_v1_entry_point_proto.Services().ByName("EntryPointService").Methods()
|
||||
entryPointServiceGetEntryPointHandler := connect.NewUnaryHandler(
|
||||
EntryPointServiceGetEntryPointProcedure,
|
||||
svc.GetEntryPoint,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("GetEntryPoint")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
entryPointServiceCreateEntryPointHandler := connect.NewUnaryHandler(
|
||||
EntryPointServiceCreateEntryPointProcedure,
|
||||
svc.CreateEntryPoint,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("CreateEntryPoint")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
entryPointServiceUpdateEntryPointHandler := connect.NewUnaryHandler(
|
||||
EntryPointServiceUpdateEntryPointProcedure,
|
||||
svc.UpdateEntryPoint,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("UpdateEntryPoint")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
entryPointServiceDeleteEntryPointHandler := connect.NewUnaryHandler(
|
||||
EntryPointServiceDeleteEntryPointProcedure,
|
||||
svc.DeleteEntryPoint,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("DeleteEntryPoint")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
entryPointServiceListEntryPointsHandler := connect.NewUnaryHandler(
|
||||
EntryPointServiceListEntryPointsProcedure,
|
||||
svc.ListEntryPoints,
|
||||
connect.WithSchema(entryPointServiceMethods.ByName("ListEntryPoints")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/mantrae.v1.EntryPointService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case EntryPointServiceGetEntryPointProcedure:
|
||||
entryPointServiceGetEntryPointHandler.ServeHTTP(w, r)
|
||||
case EntryPointServiceCreateEntryPointProcedure:
|
||||
entryPointServiceCreateEntryPointHandler.ServeHTTP(w, r)
|
||||
case EntryPointServiceUpdateEntryPointProcedure:
|
||||
entryPointServiceUpdateEntryPointHandler.ServeHTTP(w, r)
|
||||
case EntryPointServiceDeleteEntryPointProcedure:
|
||||
entryPointServiceDeleteEntryPointHandler.ServeHTTP(w, r)
|
||||
case EntryPointServiceListEntryPointsProcedure:
|
||||
entryPointServiceListEntryPointsHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedEntryPointServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedEntryPointServiceHandler struct{}
|
||||
|
||||
func (UnimplementedEntryPointServiceHandler) GetEntryPoint(context.Context, *connect.Request[v1.GetEntryPointRequest]) (*connect.Response[v1.GetEntryPointResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.EntryPointService.GetEntryPoint is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedEntryPointServiceHandler) CreateEntryPoint(context.Context, *connect.Request[v1.CreateEntryPointRequest]) (*connect.Response[v1.CreateEntryPointResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.EntryPointService.CreateEntryPoint is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedEntryPointServiceHandler) UpdateEntryPoint(context.Context, *connect.Request[v1.UpdateEntryPointRequest]) (*connect.Response[v1.UpdateEntryPointResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.EntryPointService.UpdateEntryPoint is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedEntryPointServiceHandler) DeleteEntryPoint(context.Context, *connect.Request[v1.DeleteEntryPointRequest]) (*connect.Response[v1.DeleteEntryPointResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.EntryPointService.DeleteEntryPoint is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedEntryPointServiceHandler) ListEntryPoints(context.Context, *connect.Request[v1.ListEntryPointsRequest]) (*connect.Response[v1.ListEntryPointsResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.EntryPointService.ListEntryPoints is not implemented"))
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: server/v1/profile.proto
|
||||
// Source: mantrae/v1/profile.proto
|
||||
|
||||
package serverv1connect
|
||||
package mantraev1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "github.com/mizuchilabs/mantrae/proto/gen/server/v1"
|
||||
v1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
@@ -22,7 +22,7 @@ const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// ProfileServiceName is the fully-qualified name of the ProfileService service.
|
||||
ProfileServiceName = "server.v1.ProfileService"
|
||||
ProfileServiceName = "mantrae.v1.ProfileService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
@@ -35,22 +35,22 @@ const (
|
||||
const (
|
||||
// ProfileServiceGetProfileProcedure is the fully-qualified name of the ProfileService's GetProfile
|
||||
// RPC.
|
||||
ProfileServiceGetProfileProcedure = "/server.v1.ProfileService/GetProfile"
|
||||
ProfileServiceGetProfileProcedure = "/mantrae.v1.ProfileService/GetProfile"
|
||||
// ProfileServiceCreateProfileProcedure is the fully-qualified name of the ProfileService's
|
||||
// CreateProfile RPC.
|
||||
ProfileServiceCreateProfileProcedure = "/server.v1.ProfileService/CreateProfile"
|
||||
ProfileServiceCreateProfileProcedure = "/mantrae.v1.ProfileService/CreateProfile"
|
||||
// ProfileServiceUpdateProfileProcedure is the fully-qualified name of the ProfileService's
|
||||
// UpdateProfile RPC.
|
||||
ProfileServiceUpdateProfileProcedure = "/server.v1.ProfileService/UpdateProfile"
|
||||
ProfileServiceUpdateProfileProcedure = "/mantrae.v1.ProfileService/UpdateProfile"
|
||||
// ProfileServiceDeleteProfileProcedure is the fully-qualified name of the ProfileService's
|
||||
// DeleteProfile RPC.
|
||||
ProfileServiceDeleteProfileProcedure = "/server.v1.ProfileService/DeleteProfile"
|
||||
ProfileServiceDeleteProfileProcedure = "/mantrae.v1.ProfileService/DeleteProfile"
|
||||
// ProfileServiceListProfilesProcedure is the fully-qualified name of the ProfileService's
|
||||
// ListProfiles RPC.
|
||||
ProfileServiceListProfilesProcedure = "/server.v1.ProfileService/ListProfiles"
|
||||
ProfileServiceListProfilesProcedure = "/mantrae.v1.ProfileService/ListProfiles"
|
||||
)
|
||||
|
||||
// ProfileServiceClient is a client for the server.v1.ProfileService service.
|
||||
// ProfileServiceClient is a client for the mantrae.v1.ProfileService service.
|
||||
type ProfileServiceClient interface {
|
||||
GetProfile(context.Context, *connect.Request[v1.GetProfileRequest]) (*connect.Response[v1.GetProfileResponse], error)
|
||||
CreateProfile(context.Context, *connect.Request[v1.CreateProfileRequest]) (*connect.Response[v1.CreateProfileResponse], error)
|
||||
@@ -59,21 +59,22 @@ type ProfileServiceClient interface {
|
||||
ListProfiles(context.Context, *connect.Request[v1.ListProfilesRequest]) (*connect.Response[v1.ListProfilesResponse], error)
|
||||
}
|
||||
|
||||
// NewProfileServiceClient constructs a client for the server.v1.ProfileService service. By default,
|
||||
// it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and
|
||||
// sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC()
|
||||
// or connect.WithGRPCWeb() options.
|
||||
// NewProfileServiceClient constructs a client for the mantrae.v1.ProfileService service. By
|
||||
// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
|
||||
// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
|
||||
// connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewProfileServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ProfileServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
profileServiceMethods := v1.File_server_v1_profile_proto.Services().ByName("ProfileService").Methods()
|
||||
profileServiceMethods := v1.File_mantrae_v1_profile_proto.Services().ByName("ProfileService").Methods()
|
||||
return &profileServiceClient{
|
||||
getProfile: connect.NewClient[v1.GetProfileRequest, v1.GetProfileResponse](
|
||||
httpClient,
|
||||
baseURL+ProfileServiceGetProfileProcedure,
|
||||
connect.WithSchema(profileServiceMethods.ByName("GetProfile")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
createProfile: connect.NewClient[v1.CreateProfileRequest, v1.CreateProfileResponse](
|
||||
@@ -98,6 +99,7 @@ func NewProfileServiceClient(httpClient connect.HTTPClient, baseURL string, opts
|
||||
httpClient,
|
||||
baseURL+ProfileServiceListProfilesProcedure,
|
||||
connect.WithSchema(profileServiceMethods.ByName("ListProfiles")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
@@ -112,32 +114,32 @@ type profileServiceClient struct {
|
||||
listProfiles *connect.Client[v1.ListProfilesRequest, v1.ListProfilesResponse]
|
||||
}
|
||||
|
||||
// GetProfile calls server.v1.ProfileService.GetProfile.
|
||||
// GetProfile calls mantrae.v1.ProfileService.GetProfile.
|
||||
func (c *profileServiceClient) GetProfile(ctx context.Context, req *connect.Request[v1.GetProfileRequest]) (*connect.Response[v1.GetProfileResponse], error) {
|
||||
return c.getProfile.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// CreateProfile calls server.v1.ProfileService.CreateProfile.
|
||||
// CreateProfile calls mantrae.v1.ProfileService.CreateProfile.
|
||||
func (c *profileServiceClient) CreateProfile(ctx context.Context, req *connect.Request[v1.CreateProfileRequest]) (*connect.Response[v1.CreateProfileResponse], error) {
|
||||
return c.createProfile.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// UpdateProfile calls server.v1.ProfileService.UpdateProfile.
|
||||
// UpdateProfile calls mantrae.v1.ProfileService.UpdateProfile.
|
||||
func (c *profileServiceClient) UpdateProfile(ctx context.Context, req *connect.Request[v1.UpdateProfileRequest]) (*connect.Response[v1.UpdateProfileResponse], error) {
|
||||
return c.updateProfile.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// DeleteProfile calls server.v1.ProfileService.DeleteProfile.
|
||||
// DeleteProfile calls mantrae.v1.ProfileService.DeleteProfile.
|
||||
func (c *profileServiceClient) DeleteProfile(ctx context.Context, req *connect.Request[v1.DeleteProfileRequest]) (*connect.Response[v1.DeleteProfileResponse], error) {
|
||||
return c.deleteProfile.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListProfiles calls server.v1.ProfileService.ListProfiles.
|
||||
// ListProfiles calls mantrae.v1.ProfileService.ListProfiles.
|
||||
func (c *profileServiceClient) ListProfiles(ctx context.Context, req *connect.Request[v1.ListProfilesRequest]) (*connect.Response[v1.ListProfilesResponse], error) {
|
||||
return c.listProfiles.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ProfileServiceHandler is an implementation of the server.v1.ProfileService service.
|
||||
// ProfileServiceHandler is an implementation of the mantrae.v1.ProfileService service.
|
||||
type ProfileServiceHandler interface {
|
||||
GetProfile(context.Context, *connect.Request[v1.GetProfileRequest]) (*connect.Response[v1.GetProfileResponse], error)
|
||||
CreateProfile(context.Context, *connect.Request[v1.CreateProfileRequest]) (*connect.Response[v1.CreateProfileResponse], error)
|
||||
@@ -152,11 +154,12 @@ type ProfileServiceHandler interface {
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewProfileServiceHandler(svc ProfileServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
profileServiceMethods := v1.File_server_v1_profile_proto.Services().ByName("ProfileService").Methods()
|
||||
profileServiceMethods := v1.File_mantrae_v1_profile_proto.Services().ByName("ProfileService").Methods()
|
||||
profileServiceGetProfileHandler := connect.NewUnaryHandler(
|
||||
ProfileServiceGetProfileProcedure,
|
||||
svc.GetProfile,
|
||||
connect.WithSchema(profileServiceMethods.ByName("GetProfile")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
profileServiceCreateProfileHandler := connect.NewUnaryHandler(
|
||||
@@ -181,9 +184,10 @@ func NewProfileServiceHandler(svc ProfileServiceHandler, opts ...connect.Handler
|
||||
ProfileServiceListProfilesProcedure,
|
||||
svc.ListProfiles,
|
||||
connect.WithSchema(profileServiceMethods.ByName("ListProfiles")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/server.v1.ProfileService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
return "/mantrae.v1.ProfileService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case ProfileServiceGetProfileProcedure:
|
||||
profileServiceGetProfileHandler.ServeHTTP(w, r)
|
||||
@@ -205,21 +209,21 @@ func NewProfileServiceHandler(svc ProfileServiceHandler, opts ...connect.Handler
|
||||
type UnimplementedProfileServiceHandler struct{}
|
||||
|
||||
func (UnimplementedProfileServiceHandler) GetProfile(context.Context, *connect.Request[v1.GetProfileRequest]) (*connect.Response[v1.GetProfileResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("server.v1.ProfileService.GetProfile is not implemented"))
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.ProfileService.GetProfile is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedProfileServiceHandler) CreateProfile(context.Context, *connect.Request[v1.CreateProfileRequest]) (*connect.Response[v1.CreateProfileResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("server.v1.ProfileService.CreateProfile is not implemented"))
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.ProfileService.CreateProfile is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedProfileServiceHandler) UpdateProfile(context.Context, *connect.Request[v1.UpdateProfileRequest]) (*connect.Response[v1.UpdateProfileResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("server.v1.ProfileService.UpdateProfile is not implemented"))
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.ProfileService.UpdateProfile is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedProfileServiceHandler) DeleteProfile(context.Context, *connect.Request[v1.DeleteProfileRequest]) (*connect.Response[v1.DeleteProfileResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("server.v1.ProfileService.DeleteProfile is not implemented"))
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.ProfileService.DeleteProfile is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedProfileServiceHandler) ListProfiles(context.Context, *connect.Request[v1.ListProfilesRequest]) (*connect.Response[v1.ListProfilesResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("server.v1.ProfileService.ListProfiles is not implemented"))
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.ProfileService.ListProfiles is not implemented"))
|
||||
}
|
||||
171
proto/gen/mantrae/v1/mantraev1connect/setting.connect.go
Normal file
171
proto/gen/mantrae/v1/mantraev1connect/setting.connect.go
Normal file
@@ -0,0 +1,171 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: mantrae/v1/setting.proto
|
||||
|
||||
package mantraev1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// SettingServiceName is the fully-qualified name of the SettingService service.
|
||||
SettingServiceName = "mantrae.v1.SettingService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// SettingServiceGetSettingProcedure is the fully-qualified name of the SettingService's GetSetting
|
||||
// RPC.
|
||||
SettingServiceGetSettingProcedure = "/mantrae.v1.SettingService/GetSetting"
|
||||
// SettingServiceUpdateSettingProcedure is the fully-qualified name of the SettingService's
|
||||
// UpdateSetting RPC.
|
||||
SettingServiceUpdateSettingProcedure = "/mantrae.v1.SettingService/UpdateSetting"
|
||||
// SettingServiceListSettingsProcedure is the fully-qualified name of the SettingService's
|
||||
// ListSettings RPC.
|
||||
SettingServiceListSettingsProcedure = "/mantrae.v1.SettingService/ListSettings"
|
||||
)
|
||||
|
||||
// SettingServiceClient is a client for the mantrae.v1.SettingService service.
|
||||
type SettingServiceClient interface {
|
||||
GetSetting(context.Context, *connect.Request[v1.GetSettingRequest]) (*connect.Response[v1.GetSettingResponse], error)
|
||||
UpdateSetting(context.Context, *connect.Request[v1.UpdateSettingRequest]) (*connect.Response[v1.UpdateSettingResponse], error)
|
||||
ListSettings(context.Context, *connect.Request[v1.ListSettingsRequest]) (*connect.Response[v1.ListSettingsResponse], error)
|
||||
}
|
||||
|
||||
// NewSettingServiceClient constructs a client for the mantrae.v1.SettingService service. By
|
||||
// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
|
||||
// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
|
||||
// connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewSettingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SettingServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
settingServiceMethods := v1.File_mantrae_v1_setting_proto.Services().ByName("SettingService").Methods()
|
||||
return &settingServiceClient{
|
||||
getSetting: connect.NewClient[v1.GetSettingRequest, v1.GetSettingResponse](
|
||||
httpClient,
|
||||
baseURL+SettingServiceGetSettingProcedure,
|
||||
connect.WithSchema(settingServiceMethods.ByName("GetSetting")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
updateSetting: connect.NewClient[v1.UpdateSettingRequest, v1.UpdateSettingResponse](
|
||||
httpClient,
|
||||
baseURL+SettingServiceUpdateSettingProcedure,
|
||||
connect.WithSchema(settingServiceMethods.ByName("UpdateSetting")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
listSettings: connect.NewClient[v1.ListSettingsRequest, v1.ListSettingsResponse](
|
||||
httpClient,
|
||||
baseURL+SettingServiceListSettingsProcedure,
|
||||
connect.WithSchema(settingServiceMethods.ByName("ListSettings")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// settingServiceClient implements SettingServiceClient.
|
||||
type settingServiceClient struct {
|
||||
getSetting *connect.Client[v1.GetSettingRequest, v1.GetSettingResponse]
|
||||
updateSetting *connect.Client[v1.UpdateSettingRequest, v1.UpdateSettingResponse]
|
||||
listSettings *connect.Client[v1.ListSettingsRequest, v1.ListSettingsResponse]
|
||||
}
|
||||
|
||||
// GetSetting calls mantrae.v1.SettingService.GetSetting.
|
||||
func (c *settingServiceClient) GetSetting(ctx context.Context, req *connect.Request[v1.GetSettingRequest]) (*connect.Response[v1.GetSettingResponse], error) {
|
||||
return c.getSetting.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// UpdateSetting calls mantrae.v1.SettingService.UpdateSetting.
|
||||
func (c *settingServiceClient) UpdateSetting(ctx context.Context, req *connect.Request[v1.UpdateSettingRequest]) (*connect.Response[v1.UpdateSettingResponse], error) {
|
||||
return c.updateSetting.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListSettings calls mantrae.v1.SettingService.ListSettings.
|
||||
func (c *settingServiceClient) ListSettings(ctx context.Context, req *connect.Request[v1.ListSettingsRequest]) (*connect.Response[v1.ListSettingsResponse], error) {
|
||||
return c.listSettings.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SettingServiceHandler is an implementation of the mantrae.v1.SettingService service.
|
||||
type SettingServiceHandler interface {
|
||||
GetSetting(context.Context, *connect.Request[v1.GetSettingRequest]) (*connect.Response[v1.GetSettingResponse], error)
|
||||
UpdateSetting(context.Context, *connect.Request[v1.UpdateSettingRequest]) (*connect.Response[v1.UpdateSettingResponse], error)
|
||||
ListSettings(context.Context, *connect.Request[v1.ListSettingsRequest]) (*connect.Response[v1.ListSettingsResponse], error)
|
||||
}
|
||||
|
||||
// NewSettingServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
// path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewSettingServiceHandler(svc SettingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
settingServiceMethods := v1.File_mantrae_v1_setting_proto.Services().ByName("SettingService").Methods()
|
||||
settingServiceGetSettingHandler := connect.NewUnaryHandler(
|
||||
SettingServiceGetSettingProcedure,
|
||||
svc.GetSetting,
|
||||
connect.WithSchema(settingServiceMethods.ByName("GetSetting")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
settingServiceUpdateSettingHandler := connect.NewUnaryHandler(
|
||||
SettingServiceUpdateSettingProcedure,
|
||||
svc.UpdateSetting,
|
||||
connect.WithSchema(settingServiceMethods.ByName("UpdateSetting")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
settingServiceListSettingsHandler := connect.NewUnaryHandler(
|
||||
SettingServiceListSettingsProcedure,
|
||||
svc.ListSettings,
|
||||
connect.WithSchema(settingServiceMethods.ByName("ListSettings")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/mantrae.v1.SettingService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case SettingServiceGetSettingProcedure:
|
||||
settingServiceGetSettingHandler.ServeHTTP(w, r)
|
||||
case SettingServiceUpdateSettingProcedure:
|
||||
settingServiceUpdateSettingHandler.ServeHTTP(w, r)
|
||||
case SettingServiceListSettingsProcedure:
|
||||
settingServiceListSettingsHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedSettingServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedSettingServiceHandler struct{}
|
||||
|
||||
func (UnimplementedSettingServiceHandler) GetSetting(context.Context, *connect.Request[v1.GetSettingRequest]) (*connect.Response[v1.GetSettingResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.SettingService.GetSetting is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedSettingServiceHandler) UpdateSetting(context.Context, *connect.Request[v1.UpdateSettingRequest]) (*connect.Response[v1.UpdateSettingResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.SettingService.UpdateSetting is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedSettingServiceHandler) ListSettings(context.Context, *connect.Request[v1.ListSettingsRequest]) (*connect.Response[v1.ListSettingsResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.SettingService.ListSettings is not implemented"))
|
||||
}
|
||||
336
proto/gen/mantrae/v1/mantraev1connect/user.connect.go
Normal file
336
proto/gen/mantrae/v1/mantraev1connect/user.connect.go
Normal file
@@ -0,0 +1,336 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: mantrae/v1/user.proto
|
||||
|
||||
package mantraev1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// UserServiceName is the fully-qualified name of the UserService service.
|
||||
UserServiceName = "mantrae.v1.UserService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// UserServiceLoginUserProcedure is the fully-qualified name of the UserService's LoginUser RPC.
|
||||
UserServiceLoginUserProcedure = "/mantrae.v1.UserService/LoginUser"
|
||||
// UserServiceVerifyJWTProcedure is the fully-qualified name of the UserService's VerifyJWT RPC.
|
||||
UserServiceVerifyJWTProcedure = "/mantrae.v1.UserService/VerifyJWT"
|
||||
// UserServiceVerifyOTPProcedure is the fully-qualified name of the UserService's VerifyOTP RPC.
|
||||
UserServiceVerifyOTPProcedure = "/mantrae.v1.UserService/VerifyOTP"
|
||||
// UserServiceSendOTPProcedure is the fully-qualified name of the UserService's SendOTP RPC.
|
||||
UserServiceSendOTPProcedure = "/mantrae.v1.UserService/SendOTP"
|
||||
// UserServiceGetUserProcedure is the fully-qualified name of the UserService's GetUser RPC.
|
||||
UserServiceGetUserProcedure = "/mantrae.v1.UserService/GetUser"
|
||||
// UserServiceCreateUserProcedure is the fully-qualified name of the UserService's CreateUser RPC.
|
||||
UserServiceCreateUserProcedure = "/mantrae.v1.UserService/CreateUser"
|
||||
// UserServiceUpdateUserProcedure is the fully-qualified name of the UserService's UpdateUser RPC.
|
||||
UserServiceUpdateUserProcedure = "/mantrae.v1.UserService/UpdateUser"
|
||||
// UserServiceDeleteUserProcedure is the fully-qualified name of the UserService's DeleteUser RPC.
|
||||
UserServiceDeleteUserProcedure = "/mantrae.v1.UserService/DeleteUser"
|
||||
// UserServiceListUsersProcedure is the fully-qualified name of the UserService's ListUsers RPC.
|
||||
UserServiceListUsersProcedure = "/mantrae.v1.UserService/ListUsers"
|
||||
)
|
||||
|
||||
// UserServiceClient is a client for the mantrae.v1.UserService service.
|
||||
type UserServiceClient interface {
|
||||
LoginUser(context.Context, *connect.Request[v1.LoginUserRequest]) (*connect.Response[v1.LoginUserResponse], error)
|
||||
VerifyJWT(context.Context, *connect.Request[v1.VerifyJWTRequest]) (*connect.Response[v1.VerifyJWTResponse], error)
|
||||
VerifyOTP(context.Context, *connect.Request[v1.VerifyOTPRequest]) (*connect.Response[v1.VerifyOTPResponse], error)
|
||||
SendOTP(context.Context, *connect.Request[v1.SendOTPRequest]) (*connect.Response[v1.SendOTPResponse], error)
|
||||
GetUser(context.Context, *connect.Request[v1.GetUserRequest]) (*connect.Response[v1.GetUserResponse], error)
|
||||
CreateUser(context.Context, *connect.Request[v1.CreateUserRequest]) (*connect.Response[v1.CreateUserResponse], error)
|
||||
UpdateUser(context.Context, *connect.Request[v1.UpdateUserRequest]) (*connect.Response[v1.UpdateUserResponse], error)
|
||||
DeleteUser(context.Context, *connect.Request[v1.DeleteUserRequest]) (*connect.Response[v1.DeleteUserResponse], error)
|
||||
ListUsers(context.Context, *connect.Request[v1.ListUsersRequest]) (*connect.Response[v1.ListUsersResponse], error)
|
||||
}
|
||||
|
||||
// NewUserServiceClient constructs a client for the mantrae.v1.UserService service. By default, it
|
||||
// uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
|
||||
// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
|
||||
// connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewUserServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) UserServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
userServiceMethods := v1.File_mantrae_v1_user_proto.Services().ByName("UserService").Methods()
|
||||
return &userServiceClient{
|
||||
loginUser: connect.NewClient[v1.LoginUserRequest, v1.LoginUserResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceLoginUserProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("LoginUser")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
verifyJWT: connect.NewClient[v1.VerifyJWTRequest, v1.VerifyJWTResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceVerifyJWTProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("VerifyJWT")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
verifyOTP: connect.NewClient[v1.VerifyOTPRequest, v1.VerifyOTPResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceVerifyOTPProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("VerifyOTP")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
sendOTP: connect.NewClient[v1.SendOTPRequest, v1.SendOTPResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceSendOTPProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("SendOTP")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
getUser: connect.NewClient[v1.GetUserRequest, v1.GetUserResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceGetUserProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("GetUser")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
createUser: connect.NewClient[v1.CreateUserRequest, v1.CreateUserResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceCreateUserProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("CreateUser")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
updateUser: connect.NewClient[v1.UpdateUserRequest, v1.UpdateUserResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceUpdateUserProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("UpdateUser")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
deleteUser: connect.NewClient[v1.DeleteUserRequest, v1.DeleteUserResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceDeleteUserProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("DeleteUser")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
listUsers: connect.NewClient[v1.ListUsersRequest, v1.ListUsersResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceListUsersProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("ListUsers")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// userServiceClient implements UserServiceClient.
|
||||
type userServiceClient struct {
|
||||
loginUser *connect.Client[v1.LoginUserRequest, v1.LoginUserResponse]
|
||||
verifyJWT *connect.Client[v1.VerifyJWTRequest, v1.VerifyJWTResponse]
|
||||
verifyOTP *connect.Client[v1.VerifyOTPRequest, v1.VerifyOTPResponse]
|
||||
sendOTP *connect.Client[v1.SendOTPRequest, v1.SendOTPResponse]
|
||||
getUser *connect.Client[v1.GetUserRequest, v1.GetUserResponse]
|
||||
createUser *connect.Client[v1.CreateUserRequest, v1.CreateUserResponse]
|
||||
updateUser *connect.Client[v1.UpdateUserRequest, v1.UpdateUserResponse]
|
||||
deleteUser *connect.Client[v1.DeleteUserRequest, v1.DeleteUserResponse]
|
||||
listUsers *connect.Client[v1.ListUsersRequest, v1.ListUsersResponse]
|
||||
}
|
||||
|
||||
// LoginUser calls mantrae.v1.UserService.LoginUser.
|
||||
func (c *userServiceClient) LoginUser(ctx context.Context, req *connect.Request[v1.LoginUserRequest]) (*connect.Response[v1.LoginUserResponse], error) {
|
||||
return c.loginUser.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// VerifyJWT calls mantrae.v1.UserService.VerifyJWT.
|
||||
func (c *userServiceClient) VerifyJWT(ctx context.Context, req *connect.Request[v1.VerifyJWTRequest]) (*connect.Response[v1.VerifyJWTResponse], error) {
|
||||
return c.verifyJWT.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// VerifyOTP calls mantrae.v1.UserService.VerifyOTP.
|
||||
func (c *userServiceClient) VerifyOTP(ctx context.Context, req *connect.Request[v1.VerifyOTPRequest]) (*connect.Response[v1.VerifyOTPResponse], error) {
|
||||
return c.verifyOTP.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SendOTP calls mantrae.v1.UserService.SendOTP.
|
||||
func (c *userServiceClient) SendOTP(ctx context.Context, req *connect.Request[v1.SendOTPRequest]) (*connect.Response[v1.SendOTPResponse], error) {
|
||||
return c.sendOTP.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// GetUser calls mantrae.v1.UserService.GetUser.
|
||||
func (c *userServiceClient) GetUser(ctx context.Context, req *connect.Request[v1.GetUserRequest]) (*connect.Response[v1.GetUserResponse], error) {
|
||||
return c.getUser.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// CreateUser calls mantrae.v1.UserService.CreateUser.
|
||||
func (c *userServiceClient) CreateUser(ctx context.Context, req *connect.Request[v1.CreateUserRequest]) (*connect.Response[v1.CreateUserResponse], error) {
|
||||
return c.createUser.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// UpdateUser calls mantrae.v1.UserService.UpdateUser.
|
||||
func (c *userServiceClient) UpdateUser(ctx context.Context, req *connect.Request[v1.UpdateUserRequest]) (*connect.Response[v1.UpdateUserResponse], error) {
|
||||
return c.updateUser.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// DeleteUser calls mantrae.v1.UserService.DeleteUser.
|
||||
func (c *userServiceClient) DeleteUser(ctx context.Context, req *connect.Request[v1.DeleteUserRequest]) (*connect.Response[v1.DeleteUserResponse], error) {
|
||||
return c.deleteUser.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// ListUsers calls mantrae.v1.UserService.ListUsers.
|
||||
func (c *userServiceClient) ListUsers(ctx context.Context, req *connect.Request[v1.ListUsersRequest]) (*connect.Response[v1.ListUsersResponse], error) {
|
||||
return c.listUsers.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// UserServiceHandler is an implementation of the mantrae.v1.UserService service.
|
||||
type UserServiceHandler interface {
|
||||
LoginUser(context.Context, *connect.Request[v1.LoginUserRequest]) (*connect.Response[v1.LoginUserResponse], error)
|
||||
VerifyJWT(context.Context, *connect.Request[v1.VerifyJWTRequest]) (*connect.Response[v1.VerifyJWTResponse], error)
|
||||
VerifyOTP(context.Context, *connect.Request[v1.VerifyOTPRequest]) (*connect.Response[v1.VerifyOTPResponse], error)
|
||||
SendOTP(context.Context, *connect.Request[v1.SendOTPRequest]) (*connect.Response[v1.SendOTPResponse], error)
|
||||
GetUser(context.Context, *connect.Request[v1.GetUserRequest]) (*connect.Response[v1.GetUserResponse], error)
|
||||
CreateUser(context.Context, *connect.Request[v1.CreateUserRequest]) (*connect.Response[v1.CreateUserResponse], error)
|
||||
UpdateUser(context.Context, *connect.Request[v1.UpdateUserRequest]) (*connect.Response[v1.UpdateUserResponse], error)
|
||||
DeleteUser(context.Context, *connect.Request[v1.DeleteUserRequest]) (*connect.Response[v1.DeleteUserResponse], error)
|
||||
ListUsers(context.Context, *connect.Request[v1.ListUsersRequest]) (*connect.Response[v1.ListUsersResponse], error)
|
||||
}
|
||||
|
||||
// NewUserServiceHandler builds an HTTP handler from the service implementation. It returns the path
|
||||
// on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewUserServiceHandler(svc UserServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
userServiceMethods := v1.File_mantrae_v1_user_proto.Services().ByName("UserService").Methods()
|
||||
userServiceLoginUserHandler := connect.NewUnaryHandler(
|
||||
UserServiceLoginUserProcedure,
|
||||
svc.LoginUser,
|
||||
connect.WithSchema(userServiceMethods.ByName("LoginUser")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceVerifyJWTHandler := connect.NewUnaryHandler(
|
||||
UserServiceVerifyJWTProcedure,
|
||||
svc.VerifyJWT,
|
||||
connect.WithSchema(userServiceMethods.ByName("VerifyJWT")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceVerifyOTPHandler := connect.NewUnaryHandler(
|
||||
UserServiceVerifyOTPProcedure,
|
||||
svc.VerifyOTP,
|
||||
connect.WithSchema(userServiceMethods.ByName("VerifyOTP")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceSendOTPHandler := connect.NewUnaryHandler(
|
||||
UserServiceSendOTPProcedure,
|
||||
svc.SendOTP,
|
||||
connect.WithSchema(userServiceMethods.ByName("SendOTP")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceGetUserHandler := connect.NewUnaryHandler(
|
||||
UserServiceGetUserProcedure,
|
||||
svc.GetUser,
|
||||
connect.WithSchema(userServiceMethods.ByName("GetUser")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceCreateUserHandler := connect.NewUnaryHandler(
|
||||
UserServiceCreateUserProcedure,
|
||||
svc.CreateUser,
|
||||
connect.WithSchema(userServiceMethods.ByName("CreateUser")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceUpdateUserHandler := connect.NewUnaryHandler(
|
||||
UserServiceUpdateUserProcedure,
|
||||
svc.UpdateUser,
|
||||
connect.WithSchema(userServiceMethods.ByName("UpdateUser")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceDeleteUserHandler := connect.NewUnaryHandler(
|
||||
UserServiceDeleteUserProcedure,
|
||||
svc.DeleteUser,
|
||||
connect.WithSchema(userServiceMethods.ByName("DeleteUser")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceListUsersHandler := connect.NewUnaryHandler(
|
||||
UserServiceListUsersProcedure,
|
||||
svc.ListUsers,
|
||||
connect.WithSchema(userServiceMethods.ByName("ListUsers")),
|
||||
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/mantrae.v1.UserService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case UserServiceLoginUserProcedure:
|
||||
userServiceLoginUserHandler.ServeHTTP(w, r)
|
||||
case UserServiceVerifyJWTProcedure:
|
||||
userServiceVerifyJWTHandler.ServeHTTP(w, r)
|
||||
case UserServiceVerifyOTPProcedure:
|
||||
userServiceVerifyOTPHandler.ServeHTTP(w, r)
|
||||
case UserServiceSendOTPProcedure:
|
||||
userServiceSendOTPHandler.ServeHTTP(w, r)
|
||||
case UserServiceGetUserProcedure:
|
||||
userServiceGetUserHandler.ServeHTTP(w, r)
|
||||
case UserServiceCreateUserProcedure:
|
||||
userServiceCreateUserHandler.ServeHTTP(w, r)
|
||||
case UserServiceUpdateUserProcedure:
|
||||
userServiceUpdateUserHandler.ServeHTTP(w, r)
|
||||
case UserServiceDeleteUserProcedure:
|
||||
userServiceDeleteUserHandler.ServeHTTP(w, r)
|
||||
case UserServiceListUsersProcedure:
|
||||
userServiceListUsersHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedUserServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedUserServiceHandler struct{}
|
||||
|
||||
func (UnimplementedUserServiceHandler) LoginUser(context.Context, *connect.Request[v1.LoginUserRequest]) (*connect.Response[v1.LoginUserResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UserService.LoginUser is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) VerifyJWT(context.Context, *connect.Request[v1.VerifyJWTRequest]) (*connect.Response[v1.VerifyJWTResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UserService.VerifyJWT is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) VerifyOTP(context.Context, *connect.Request[v1.VerifyOTPRequest]) (*connect.Response[v1.VerifyOTPResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UserService.VerifyOTP is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) SendOTP(context.Context, *connect.Request[v1.SendOTPRequest]) (*connect.Response[v1.SendOTPResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UserService.SendOTP is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) GetUser(context.Context, *connect.Request[v1.GetUserRequest]) (*connect.Response[v1.GetUserResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UserService.GetUser is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) CreateUser(context.Context, *connect.Request[v1.CreateUserRequest]) (*connect.Response[v1.CreateUserResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UserService.CreateUser is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) UpdateUser(context.Context, *connect.Request[v1.UpdateUserRequest]) (*connect.Response[v1.UpdateUserResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UserService.UpdateUser is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) DeleteUser(context.Context, *connect.Request[v1.DeleteUserRequest]) (*connect.Response[v1.DeleteUserResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UserService.DeleteUser is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) ListUsers(context.Context, *connect.Request[v1.ListUsersRequest]) (*connect.Response[v1.ListUsersResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UserService.ListUsers is not implemented"))
|
||||
}
|
||||
756
proto/gen/mantrae/v1/profile.pb.go
Normal file
756
proto/gen/mantrae/v1/profile.pb.go
Normal file
@@ -0,0 +1,756 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: mantrae/v1/profile.proto
|
||||
|
||||
package mantraev1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Profile struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Profile) Reset() {
|
||||
*x = Profile{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Profile) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Profile) ProtoMessage() {}
|
||||
|
||||
func (x *Profile) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Profile.ProtoReflect.Descriptor instead.
|
||||
func (*Profile) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Profile) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Profile) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Profile) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Profile) GetCreatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Profile) GetUpdatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetProfileRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetProfileRequest) Reset() {
|
||||
*x = GetProfileRequest{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetProfileRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetProfileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetProfileRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetProfileRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetProfileRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetProfileResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetProfileResponse) Reset() {
|
||||
*x = GetProfileResponse{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetProfileResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetProfileResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetProfileResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetProfileResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetProfileResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetProfileResponse) GetProfile() *Profile {
|
||||
if x != nil {
|
||||
return x.Profile
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CreateProfileRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateProfileRequest) Reset() {
|
||||
*x = CreateProfileRequest{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateProfileRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateProfileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateProfileRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateProfileRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *CreateProfileRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateProfileRequest) GetDescription() string {
|
||||
if x != nil && x.Description != nil {
|
||||
return *x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateProfileResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateProfileResponse) Reset() {
|
||||
*x = CreateProfileResponse{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateProfileResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateProfileResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateProfileResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateProfileResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreateProfileResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *CreateProfileResponse) GetProfile() *Profile {
|
||||
if x != nil {
|
||||
return x.Profile
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UpdateProfileRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) Reset() {
|
||||
*x = UpdateProfileRequest{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateProfileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateProfileRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateProfileRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) GetDescription() string {
|
||||
if x != nil && x.Description != nil {
|
||||
return *x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UpdateProfileResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateProfileResponse) Reset() {
|
||||
*x = UpdateProfileResponse{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateProfileResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateProfileResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateProfileResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateProfileResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateProfileResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *UpdateProfileResponse) GetProfile() *Profile {
|
||||
if x != nil {
|
||||
return x.Profile
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteProfileRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteProfileRequest) Reset() {
|
||||
*x = DeleteProfileRequest{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteProfileRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteProfileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteProfileRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteProfileRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *DeleteProfileRequest) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeleteProfileResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteProfileResponse) Reset() {
|
||||
*x = DeleteProfileResponse{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteProfileResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteProfileResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteProfileResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteProfileResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteProfileResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type ListProfilesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Limit *int64 `protobuf:"varint,1,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
|
||||
Offset *int64 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListProfilesRequest) Reset() {
|
||||
*x = ListProfilesRequest{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListProfilesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListProfilesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListProfilesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListProfilesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListProfilesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *ListProfilesRequest) GetLimit() int64 {
|
||||
if x != nil && x.Limit != nil {
|
||||
return *x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListProfilesRequest) GetOffset() int64 {
|
||||
if x != nil && x.Offset != nil {
|
||||
return *x.Offset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListProfilesResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Profiles []*Profile `protobuf:"bytes,1,rep,name=profiles,proto3" json:"profiles,omitempty"`
|
||||
TotalCount int64 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListProfilesResponse) Reset() {
|
||||
*x = ListProfilesResponse{}
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListProfilesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListProfilesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListProfilesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_profile_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListProfilesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListProfilesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_profile_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *ListProfilesResponse) GetProfiles() []*Profile {
|
||||
if x != nil {
|
||||
return x.Profiles
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListProfilesResponse) GetTotalCount() int64 {
|
||||
if x != nil {
|
||||
return x.TotalCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_mantrae_v1_profile_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_mantrae_v1_profile_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x18, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f,
|
||||
0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22,
|
||||
0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x02, 0x69, 0x64, 0x22, 0x43, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x70, 0x72,
|
||||
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61,
|
||||
0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x61, 0x0a, 0x14, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c,
|
||||
0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x15,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x22, 0x71, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72,
|
||||
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63,
|
||||
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x2d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50,
|
||||
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22,
|
||||
0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x62, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88,
|
||||
0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x03, 0x48, 0x01, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 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, 0x50, 0x72, 0x6f, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08,
|
||||
0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13,
|
||||
0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 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, 0x32, 0xbc,
|
||||
0x03, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x12, 0x50, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12,
|
||||
0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 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, 0x50,
|
||||
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03,
|
||||
0x90, 0x02, 0x01, 0x12, 0x54, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 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, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e,
|
||||
0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72,
|
||||
0x6f, 0x66, 0x69, 0x6c, 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, 0x61, 0x74, 0x65,
|
||||
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x54, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 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, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 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, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 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, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 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 (
|
||||
file_mantrae_v1_profile_proto_rawDescOnce sync.Once
|
||||
file_mantrae_v1_profile_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_mantrae_v1_profile_proto_rawDescGZIP() []byte {
|
||||
file_mantrae_v1_profile_proto_rawDescOnce.Do(func() {
|
||||
file_mantrae_v1_profile_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mantrae_v1_profile_proto_rawDesc), len(file_mantrae_v1_profile_proto_rawDesc)))
|
||||
})
|
||||
return file_mantrae_v1_profile_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mantrae_v1_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_mantrae_v1_profile_proto_goTypes = []any{
|
||||
(*Profile)(nil), // 0: mantrae.v1.Profile
|
||||
(*GetProfileRequest)(nil), // 1: mantrae.v1.GetProfileRequest
|
||||
(*GetProfileResponse)(nil), // 2: mantrae.v1.GetProfileResponse
|
||||
(*CreateProfileRequest)(nil), // 3: mantrae.v1.CreateProfileRequest
|
||||
(*CreateProfileResponse)(nil), // 4: mantrae.v1.CreateProfileResponse
|
||||
(*UpdateProfileRequest)(nil), // 5: mantrae.v1.UpdateProfileRequest
|
||||
(*UpdateProfileResponse)(nil), // 6: mantrae.v1.UpdateProfileResponse
|
||||
(*DeleteProfileRequest)(nil), // 7: mantrae.v1.DeleteProfileRequest
|
||||
(*DeleteProfileResponse)(nil), // 8: mantrae.v1.DeleteProfileResponse
|
||||
(*ListProfilesRequest)(nil), // 9: mantrae.v1.ListProfilesRequest
|
||||
(*ListProfilesResponse)(nil), // 10: mantrae.v1.ListProfilesResponse
|
||||
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
|
||||
}
|
||||
var file_mantrae_v1_profile_proto_depIdxs = []int32{
|
||||
11, // 0: mantrae.v1.Profile.created_at:type_name -> google.protobuf.Timestamp
|
||||
11, // 1: mantrae.v1.Profile.updated_at:type_name -> google.protobuf.Timestamp
|
||||
0, // 2: mantrae.v1.GetProfileResponse.profile:type_name -> mantrae.v1.Profile
|
||||
0, // 3: mantrae.v1.CreateProfileResponse.profile:type_name -> mantrae.v1.Profile
|
||||
0, // 4: mantrae.v1.UpdateProfileResponse.profile:type_name -> mantrae.v1.Profile
|
||||
0, // 5: mantrae.v1.ListProfilesResponse.profiles:type_name -> mantrae.v1.Profile
|
||||
1, // 6: mantrae.v1.ProfileService.GetProfile:input_type -> mantrae.v1.GetProfileRequest
|
||||
3, // 7: mantrae.v1.ProfileService.CreateProfile:input_type -> mantrae.v1.CreateProfileRequest
|
||||
5, // 8: mantrae.v1.ProfileService.UpdateProfile:input_type -> mantrae.v1.UpdateProfileRequest
|
||||
7, // 9: mantrae.v1.ProfileService.DeleteProfile:input_type -> mantrae.v1.DeleteProfileRequest
|
||||
9, // 10: mantrae.v1.ProfileService.ListProfiles:input_type -> mantrae.v1.ListProfilesRequest
|
||||
2, // 11: mantrae.v1.ProfileService.GetProfile:output_type -> mantrae.v1.GetProfileResponse
|
||||
4, // 12: mantrae.v1.ProfileService.CreateProfile:output_type -> mantrae.v1.CreateProfileResponse
|
||||
6, // 13: mantrae.v1.ProfileService.UpdateProfile:output_type -> mantrae.v1.UpdateProfileResponse
|
||||
8, // 14: mantrae.v1.ProfileService.DeleteProfile:output_type -> mantrae.v1.DeleteProfileResponse
|
||||
10, // 15: mantrae.v1.ProfileService.ListProfiles:output_type -> mantrae.v1.ListProfilesResponse
|
||||
11, // [11:16] is the sub-list for method output_type
|
||||
6, // [6:11] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_mantrae_v1_profile_proto_init() }
|
||||
func file_mantrae_v1_profile_proto_init() {
|
||||
if File_mantrae_v1_profile_proto != nil {
|
||||
return
|
||||
}
|
||||
file_mantrae_v1_profile_proto_msgTypes[3].OneofWrappers = []any{}
|
||||
file_mantrae_v1_profile_proto_msgTypes[5].OneofWrappers = []any{}
|
||||
file_mantrae_v1_profile_proto_msgTypes[9].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_mantrae_v1_profile_proto_rawDesc), len(file_mantrae_v1_profile_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_mantrae_v1_profile_proto_goTypes,
|
||||
DependencyIndexes: file_mantrae_v1_profile_proto_depIdxs,
|
||||
MessageInfos: file_mantrae_v1_profile_proto_msgTypes,
|
||||
}.Build()
|
||||
File_mantrae_v1_profile_proto = out.File
|
||||
file_mantrae_v1_profile_proto_goTypes = nil
|
||||
file_mantrae_v1_profile_proto_depIdxs = nil
|
||||
}
|
||||
488
proto/gen/mantrae/v1/setting.pb.go
Normal file
488
proto/gen/mantrae/v1/setting.pb.go
Normal file
@@ -0,0 +1,488 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: mantrae/v1/setting.proto
|
||||
|
||||
package mantraev1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Setting struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Setting) Reset() {
|
||||
*x = Setting{}
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Setting) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Setting) ProtoMessage() {}
|
||||
|
||||
func (x *Setting) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Setting.ProtoReflect.Descriptor instead.
|
||||
func (*Setting) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_setting_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Setting) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Setting) GetValue() string {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Setting) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Setting) GetUpdatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetSettingRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetSettingRequest) Reset() {
|
||||
*x = GetSettingRequest{}
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetSettingRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetSettingRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetSettingRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetSettingRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetSettingRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_setting_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetSettingRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetSettingResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Setting *Setting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetSettingResponse) Reset() {
|
||||
*x = GetSettingResponse{}
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetSettingResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetSettingResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetSettingResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetSettingResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetSettingResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_setting_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetSettingResponse) GetSetting() *Setting {
|
||||
if x != nil {
|
||||
return x.Setting
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UpdateSettingRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateSettingRequest) Reset() {
|
||||
*x = UpdateSettingRequest{}
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateSettingRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateSettingRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateSettingRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateSettingRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateSettingRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_setting_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *UpdateSettingRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateSettingRequest) GetValue() string {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UpdateSettingResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Setting *Setting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateSettingResponse) Reset() {
|
||||
*x = UpdateSettingResponse{}
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateSettingResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateSettingResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateSettingResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateSettingResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateSettingResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_setting_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *UpdateSettingResponse) GetSetting() *Setting {
|
||||
if x != nil {
|
||||
return x.Setting
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListSettingsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListSettingsRequest) Reset() {
|
||||
*x = ListSettingsRequest{}
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListSettingsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListSettingsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListSettingsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListSettingsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListSettingsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_setting_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
type ListSettingsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Settings []*Setting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListSettingsResponse) Reset() {
|
||||
*x = ListSettingsResponse{}
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListSettingsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListSettingsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListSettingsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_mantrae_v1_setting_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListSettingsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListSettingsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_mantrae_v1_setting_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ListSettingsResponse) GetSettings() []*Setting {
|
||||
if x != nil {
|
||||
return x.Settings
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_mantrae_v1_setting_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_mantrae_v1_setting_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x18, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x61, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,
|
||||
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a,
|
||||
0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x25, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22,
|
||||
0x43, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x22, 0x3e, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x22, 0x46, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a,
|
||||
0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13,
|
||||
0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x15, 0x0a, 0x13,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x22, 0x47, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x73,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x32, 0x90, 0x02, 0x0a,
|
||||
0x0e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||
0x50, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e,
|
||||
0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65,
|
||||
0x74, 0x74, 0x69, 0x6e, 0x67, 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, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02,
|
||||
0x01, 0x12, 0x54, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53,
|
||||
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
||||
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, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 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, 0x74, 0x74, 0x69, 0x6e, 0x67, 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 (
|
||||
file_mantrae_v1_setting_proto_rawDescOnce sync.Once
|
||||
file_mantrae_v1_setting_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_mantrae_v1_setting_proto_rawDescGZIP() []byte {
|
||||
file_mantrae_v1_setting_proto_rawDescOnce.Do(func() {
|
||||
file_mantrae_v1_setting_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_mantrae_v1_setting_proto_rawDesc), len(file_mantrae_v1_setting_proto_rawDesc)))
|
||||
})
|
||||
return file_mantrae_v1_setting_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_mantrae_v1_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_mantrae_v1_setting_proto_goTypes = []any{
|
||||
(*Setting)(nil), // 0: mantrae.v1.Setting
|
||||
(*GetSettingRequest)(nil), // 1: mantrae.v1.GetSettingRequest
|
||||
(*GetSettingResponse)(nil), // 2: mantrae.v1.GetSettingResponse
|
||||
(*UpdateSettingRequest)(nil), // 3: mantrae.v1.UpdateSettingRequest
|
||||
(*UpdateSettingResponse)(nil), // 4: mantrae.v1.UpdateSettingResponse
|
||||
(*ListSettingsRequest)(nil), // 5: mantrae.v1.ListSettingsRequest
|
||||
(*ListSettingsResponse)(nil), // 6: mantrae.v1.ListSettingsResponse
|
||||
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
|
||||
}
|
||||
var file_mantrae_v1_setting_proto_depIdxs = []int32{
|
||||
7, // 0: mantrae.v1.Setting.updated_at:type_name -> google.protobuf.Timestamp
|
||||
0, // 1: mantrae.v1.GetSettingResponse.setting:type_name -> mantrae.v1.Setting
|
||||
0, // 2: mantrae.v1.UpdateSettingResponse.setting:type_name -> mantrae.v1.Setting
|
||||
0, // 3: mantrae.v1.ListSettingsResponse.settings:type_name -> mantrae.v1.Setting
|
||||
1, // 4: mantrae.v1.SettingService.GetSetting:input_type -> mantrae.v1.GetSettingRequest
|
||||
3, // 5: mantrae.v1.SettingService.UpdateSetting:input_type -> mantrae.v1.UpdateSettingRequest
|
||||
5, // 6: mantrae.v1.SettingService.ListSettings:input_type -> mantrae.v1.ListSettingsRequest
|
||||
2, // 7: mantrae.v1.SettingService.GetSetting:output_type -> mantrae.v1.GetSettingResponse
|
||||
4, // 8: mantrae.v1.SettingService.UpdateSetting:output_type -> mantrae.v1.UpdateSettingResponse
|
||||
6, // 9: mantrae.v1.SettingService.ListSettings:output_type -> mantrae.v1.ListSettingsResponse
|
||||
7, // [7:10] is the sub-list for method output_type
|
||||
4, // [4:7] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_mantrae_v1_setting_proto_init() }
|
||||
func file_mantrae_v1_setting_proto_init() {
|
||||
if File_mantrae_v1_setting_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_mantrae_v1_setting_proto_rawDesc), len(file_mantrae_v1_setting_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_mantrae_v1_setting_proto_goTypes,
|
||||
DependencyIndexes: file_mantrae_v1_setting_proto_depIdxs,
|
||||
MessageInfos: file_mantrae_v1_setting_proto_msgTypes,
|
||||
}.Build()
|
||||
File_mantrae_v1_setting_proto = out.File
|
||||
file_mantrae_v1_setting_proto_goTypes = nil
|
||||
file_mantrae_v1_setting_proto_depIdxs = nil
|
||||
}
|
||||
1451
proto/gen/mantrae/v1/user.pb.go
Normal file
1451
proto/gen/mantrae/v1/user.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
44
proto/gen/openapi/base.yaml
Normal file
44
proto/gen/openapi/base.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Mantrae
|
||||
description: |
|
||||
Mantrae API Documentation
|
||||
For more information, visit [Mantrae Documentation](https://mizuchi.dev/mantrae).
|
||||
version: v1.0.0
|
||||
contact:
|
||||
name: Mantrae Support
|
||||
url: https://mizuchi.dev/mantrae
|
||||
email: admin@mizuchi.dev
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
|
||||
servers:
|
||||
- url: https://api.example.com/v1
|
||||
description: Production
|
||||
- url: https://staging-api.example.com/v1
|
||||
description: Staging
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
BearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
|
||||
schemas:
|
||||
Error:
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
message:
|
||||
type: string
|
||||
details:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
2196
proto/gen/openapi/openapi.yaml
Normal file
2196
proto/gen/openapi/openapi.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,701 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc (unknown)
|
||||
// source: server/v1/profile.proto
|
||||
|
||||
package serverv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Profile struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Profile) Reset() {
|
||||
*x = Profile{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Profile) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Profile) ProtoMessage() {}
|
||||
|
||||
func (x *Profile) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Profile.ProtoReflect.Descriptor instead.
|
||||
func (*Profile) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Profile) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Profile) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Profile) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Profile) GetCreatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Profile) GetUpdatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetProfileRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetProfileRequest) Reset() {
|
||||
*x = GetProfileRequest{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetProfileRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetProfileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetProfileRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetProfileRequest) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetProfileRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetProfileResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetProfileResponse) Reset() {
|
||||
*x = GetProfileResponse{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetProfileResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetProfileResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetProfileResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetProfileResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetProfileResponse) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetProfileResponse) GetProfile() *Profile {
|
||||
if x != nil {
|
||||
return x.Profile
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CreateProfileRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateProfileRequest) Reset() {
|
||||
*x = CreateProfileRequest{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateProfileRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateProfileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateProfileRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateProfileRequest) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *CreateProfileRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateProfileRequest) GetDescription() string {
|
||||
if x != nil && x.Description != nil {
|
||||
return *x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateProfileResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CreateProfileResponse) Reset() {
|
||||
*x = CreateProfileResponse{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateProfileResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateProfileResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateProfileResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateProfileResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreateProfileResponse) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *CreateProfileResponse) GetProfile() *Profile {
|
||||
if x != nil {
|
||||
return x.Profile
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UpdateProfileRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) Reset() {
|
||||
*x = UpdateProfileRequest{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateProfileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateProfileRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateProfileRequest) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateProfileRequest) GetDescription() string {
|
||||
if x != nil && x.Description != nil {
|
||||
return *x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UpdateProfileResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateProfileResponse) Reset() {
|
||||
*x = UpdateProfileResponse{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateProfileResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateProfileResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateProfileResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateProfileResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateProfileResponse) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *UpdateProfileResponse) GetProfile() *Profile {
|
||||
if x != nil {
|
||||
return x.Profile
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteProfileRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteProfileRequest) Reset() {
|
||||
*x = DeleteProfileRequest{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteProfileRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteProfileRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteProfileRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteProfileRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteProfileRequest) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *DeleteProfileRequest) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteProfileResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *DeleteProfileResponse) Reset() {
|
||||
*x = DeleteProfileResponse{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteProfileResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteProfileResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteProfileResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteProfileResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteProfileResponse) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type ListProfilesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Limit *int64 `protobuf:"varint,1,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
|
||||
Offset *int64 `protobuf:"varint,2,opt,name=offset,proto3,oneof" json:"offset,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListProfilesRequest) Reset() {
|
||||
*x = ListProfilesRequest{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListProfilesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListProfilesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListProfilesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListProfilesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListProfilesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *ListProfilesRequest) GetLimit() int64 {
|
||||
if x != nil && x.Limit != nil {
|
||||
return *x.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListProfilesRequest) GetOffset() int64 {
|
||||
if x != nil && x.Offset != nil {
|
||||
return *x.Offset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListProfilesResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Profiles []*Profile `protobuf:"bytes,1,rep,name=profiles,proto3" json:"profiles,omitempty"`
|
||||
TotalCount int64 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListProfilesResponse) Reset() {
|
||||
*x = ListProfilesResponse{}
|
||||
mi := &file_server_v1_profile_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListProfilesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListProfilesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListProfilesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_server_v1_profile_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListProfilesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListProfilesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_server_v1_profile_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *ListProfilesResponse) GetProfiles() []*Profile {
|
||||
if x != nil {
|
||||
return x.Profiles
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListProfilesResponse) GetTotalCount() int64 {
|
||||
if x != nil {
|
||||
return x.TotalCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_server_v1_profile_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_server_v1_profile_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x17server/v1/profile.proto\x12\tserver.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc5\x01\n" +
|
||||
"\aProfile\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12 \n" +
|
||||
"\vdescription\x18\x03 \x01(\tR\vdescription\x129\n" +
|
||||
"\n" +
|
||||
"created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" +
|
||||
"\n" +
|
||||
"updated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"#\n" +
|
||||
"\x11GetProfileRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\"B\n" +
|
||||
"\x12GetProfileResponse\x12,\n" +
|
||||
"\aprofile\x18\x01 \x01(\v2\x12.server.v1.ProfileR\aprofile\"a\n" +
|
||||
"\x14CreateProfileRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12%\n" +
|
||||
"\vdescription\x18\x02 \x01(\tH\x00R\vdescription\x88\x01\x01B\x0e\n" +
|
||||
"\f_description\"E\n" +
|
||||
"\x15CreateProfileResponse\x12,\n" +
|
||||
"\aprofile\x18\x01 \x01(\v2\x12.server.v1.ProfileR\aprofile\"q\n" +
|
||||
"\x14UpdateProfileRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x12%\n" +
|
||||
"\vdescription\x18\x03 \x01(\tH\x00R\vdescription\x88\x01\x01B\x0e\n" +
|
||||
"\f_description\"E\n" +
|
||||
"\x15UpdateProfileResponse\x12,\n" +
|
||||
"\aprofile\x18\x01 \x01(\v2\x12.server.v1.ProfileR\aprofile\"&\n" +
|
||||
"\x14DeleteProfileRequest\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\"\x17\n" +
|
||||
"\x15DeleteProfileResponse\"b\n" +
|
||||
"\x13ListProfilesRequest\x12\x19\n" +
|
||||
"\x05limit\x18\x01 \x01(\x03H\x00R\x05limit\x88\x01\x01\x12\x1b\n" +
|
||||
"\x06offset\x18\x02 \x01(\x03H\x01R\x06offset\x88\x01\x01B\b\n" +
|
||||
"\x06_limitB\t\n" +
|
||||
"\a_offset\"g\n" +
|
||||
"\x14ListProfilesResponse\x12.\n" +
|
||||
"\bprofiles\x18\x01 \x03(\v2\x12.server.v1.ProfileR\bprofiles\x12\x1f\n" +
|
||||
"\vtotal_count\x18\x02 \x01(\x03R\n" +
|
||||
"totalCount2\xa8\x03\n" +
|
||||
"\x0eProfileService\x12I\n" +
|
||||
"\n" +
|
||||
"GetProfile\x12\x1c.server.v1.GetProfileRequest\x1a\x1d.server.v1.GetProfileResponse\x12R\n" +
|
||||
"\rCreateProfile\x12\x1f.server.v1.CreateProfileRequest\x1a .server.v1.CreateProfileResponse\x12R\n" +
|
||||
"\rUpdateProfile\x12\x1f.server.v1.UpdateProfileRequest\x1a .server.v1.UpdateProfileResponse\x12R\n" +
|
||||
"\rDeleteProfile\x12\x1f.server.v1.DeleteProfileRequest\x1a .server.v1.DeleteProfileResponse\x12O\n" +
|
||||
"\fListProfiles\x12\x1e.server.v1.ListProfilesRequest\x1a\x1f.server.v1.ListProfilesResponseB\x9f\x01\n" +
|
||||
"\rcom.server.v1B\fProfileProtoP\x01Z;github.com/mizuchilabs/mantrae/proto/gen/server/v1;serverv1\xa2\x02\x03SXX\xaa\x02\tServer.V1\xca\x02\tServer\\V1\xe2\x02\x15Server\\V1\\GPBMetadata\xea\x02\n" +
|
||||
"Server::V1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_server_v1_profile_proto_rawDescOnce sync.Once
|
||||
file_server_v1_profile_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_server_v1_profile_proto_rawDescGZIP() []byte {
|
||||
file_server_v1_profile_proto_rawDescOnce.Do(func() {
|
||||
file_server_v1_profile_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_server_v1_profile_proto_rawDesc), len(file_server_v1_profile_proto_rawDesc)))
|
||||
})
|
||||
return file_server_v1_profile_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_server_v1_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_server_v1_profile_proto_goTypes = []any{
|
||||
(*Profile)(nil), // 0: server.v1.Profile
|
||||
(*GetProfileRequest)(nil), // 1: server.v1.GetProfileRequest
|
||||
(*GetProfileResponse)(nil), // 2: server.v1.GetProfileResponse
|
||||
(*CreateProfileRequest)(nil), // 3: server.v1.CreateProfileRequest
|
||||
(*CreateProfileResponse)(nil), // 4: server.v1.CreateProfileResponse
|
||||
(*UpdateProfileRequest)(nil), // 5: server.v1.UpdateProfileRequest
|
||||
(*UpdateProfileResponse)(nil), // 6: server.v1.UpdateProfileResponse
|
||||
(*DeleteProfileRequest)(nil), // 7: server.v1.DeleteProfileRequest
|
||||
(*DeleteProfileResponse)(nil), // 8: server.v1.DeleteProfileResponse
|
||||
(*ListProfilesRequest)(nil), // 9: server.v1.ListProfilesRequest
|
||||
(*ListProfilesResponse)(nil), // 10: server.v1.ListProfilesResponse
|
||||
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
|
||||
}
|
||||
var file_server_v1_profile_proto_depIdxs = []int32{
|
||||
11, // 0: server.v1.Profile.created_at:type_name -> google.protobuf.Timestamp
|
||||
11, // 1: server.v1.Profile.updated_at:type_name -> google.protobuf.Timestamp
|
||||
0, // 2: server.v1.GetProfileResponse.profile:type_name -> server.v1.Profile
|
||||
0, // 3: server.v1.CreateProfileResponse.profile:type_name -> server.v1.Profile
|
||||
0, // 4: server.v1.UpdateProfileResponse.profile:type_name -> server.v1.Profile
|
||||
0, // 5: server.v1.ListProfilesResponse.profiles:type_name -> server.v1.Profile
|
||||
1, // 6: server.v1.ProfileService.GetProfile:input_type -> server.v1.GetProfileRequest
|
||||
3, // 7: server.v1.ProfileService.CreateProfile:input_type -> server.v1.CreateProfileRequest
|
||||
5, // 8: server.v1.ProfileService.UpdateProfile:input_type -> server.v1.UpdateProfileRequest
|
||||
7, // 9: server.v1.ProfileService.DeleteProfile:input_type -> server.v1.DeleteProfileRequest
|
||||
9, // 10: server.v1.ProfileService.ListProfiles:input_type -> server.v1.ListProfilesRequest
|
||||
2, // 11: server.v1.ProfileService.GetProfile:output_type -> server.v1.GetProfileResponse
|
||||
4, // 12: server.v1.ProfileService.CreateProfile:output_type -> server.v1.CreateProfileResponse
|
||||
6, // 13: server.v1.ProfileService.UpdateProfile:output_type -> server.v1.UpdateProfileResponse
|
||||
8, // 14: server.v1.ProfileService.DeleteProfile:output_type -> server.v1.DeleteProfileResponse
|
||||
10, // 15: server.v1.ProfileService.ListProfiles:output_type -> server.v1.ListProfilesResponse
|
||||
11, // [11:16] is the sub-list for method output_type
|
||||
6, // [6:11] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_server_v1_profile_proto_init() }
|
||||
func file_server_v1_profile_proto_init() {
|
||||
if File_server_v1_profile_proto != nil {
|
||||
return
|
||||
}
|
||||
file_server_v1_profile_proto_msgTypes[3].OneofWrappers = []any{}
|
||||
file_server_v1_profile_proto_msgTypes[5].OneofWrappers = []any{}
|
||||
file_server_v1_profile_proto_msgTypes[9].OneofWrappers = []any{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_server_v1_profile_proto_rawDesc), len(file_server_v1_profile_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_server_v1_profile_proto_goTypes,
|
||||
DependencyIndexes: file_server_v1_profile_proto_depIdxs,
|
||||
MessageInfos: file_server_v1_profile_proto_msgTypes,
|
||||
}.Build()
|
||||
File_server_v1_profile_proto = out.File
|
||||
file_server_v1_profile_proto_goTypes = nil
|
||||
file_server_v1_profile_proto_depIdxs = nil
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package agent.v1;
|
||||
package mantrae.v1;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
66
proto/mantrae/v1/entry_point.proto
Normal file
66
proto/mantrae/v1/entry_point.proto
Normal file
@@ -0,0 +1,66 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package mantrae.v1;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service EntryPointService {
|
||||
rpc GetEntryPoint(GetEntryPointRequest) returns (GetEntryPointResponse) {
|
||||
option idempotency_level = NO_SIDE_EFFECTS;
|
||||
}
|
||||
rpc CreateEntryPoint(CreateEntryPointRequest) returns (CreateEntryPointResponse);
|
||||
rpc UpdateEntryPoint(UpdateEntryPointRequest) returns (UpdateEntryPointResponse);
|
||||
rpc DeleteEntryPoint(DeleteEntryPointRequest) returns (DeleteEntryPointResponse);
|
||||
rpc ListEntryPoints(ListEntryPointsRequest) returns (ListEntryPointsResponse) {
|
||||
option idempotency_level = NO_SIDE_EFFECTS;
|
||||
}
|
||||
}
|
||||
|
||||
message EntryPoint {
|
||||
int64 id = 1;
|
||||
string name = 2;
|
||||
string address = 3;
|
||||
bool is_default = 4;
|
||||
google.protobuf.Timestamp created_at = 5;
|
||||
google.protobuf.Timestamp updated_at = 6;
|
||||
}
|
||||
|
||||
message GetEntryPointRequest {
|
||||
int64 id = 1;
|
||||
}
|
||||
message GetEntryPointResponse {
|
||||
EntryPoint entry_point = 1;
|
||||
}
|
||||
|
||||
message CreateEntryPointRequest {
|
||||
string name = 1;
|
||||
string address = 2;
|
||||
bool is_default = 3;
|
||||
}
|
||||
message CreateEntryPointResponse {
|
||||
EntryPoint entry_point = 1;
|
||||
}
|
||||
|
||||
message UpdateEntryPointRequest {
|
||||
int64 id = 1;
|
||||
string name = 2;
|
||||
string address = 3;
|
||||
bool is_default = 4;
|
||||
}
|
||||
message UpdateEntryPointResponse {
|
||||
EntryPoint entry_point = 1;
|
||||
}
|
||||
|
||||
message DeleteEntryPointRequest {
|
||||
int64 id = 1;
|
||||
}
|
||||
message DeleteEntryPointResponse {}
|
||||
|
||||
message ListEntryPointsRequest {
|
||||
optional int64 limit = 1;
|
||||
optional int64 offset = 2;
|
||||
}
|
||||
message ListEntryPointsResponse {
|
||||
repeated EntryPoint entry_points = 1;
|
||||
int64 total_count = 2;
|
||||
}
|
||||
@@ -1,19 +1,23 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package server.v1;
|
||||
package mantrae.v1;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service ProfileService {
|
||||
rpc GetProfile(GetProfileRequest) returns (GetProfileResponse);
|
||||
rpc GetProfile(GetProfileRequest) returns (GetProfileResponse) {
|
||||
option idempotency_level = NO_SIDE_EFFECTS;
|
||||
}
|
||||
rpc CreateProfile(CreateProfileRequest) returns (CreateProfileResponse);
|
||||
rpc UpdateProfile(UpdateProfileRequest) returns (UpdateProfileResponse);
|
||||
rpc DeleteProfile(DeleteProfileRequest) returns (DeleteProfileResponse);
|
||||
rpc ListProfiles(ListProfilesRequest) returns (ListProfilesResponse);
|
||||
rpc ListProfiles(ListProfilesRequest) returns (ListProfilesResponse) {
|
||||
option idempotency_level = NO_SIDE_EFFECTS;
|
||||
}
|
||||
}
|
||||
|
||||
message Profile {
|
||||
string id = 1;
|
||||
int64 id = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
google.protobuf.Timestamp created_at = 4;
|
||||
@@ -21,7 +25,7 @@ message Profile {
|
||||
}
|
||||
|
||||
message GetProfileRequest {
|
||||
string id = 1;
|
||||
int64 id = 1;
|
||||
}
|
||||
message GetProfileResponse {
|
||||
Profile profile = 1;
|
||||
@@ -36,7 +40,7 @@ message CreateProfileResponse {
|
||||
}
|
||||
|
||||
message UpdateProfileRequest {
|
||||
string id = 1;
|
||||
int64 id = 1;
|
||||
string name = 2;
|
||||
optional string description = 3;
|
||||
}
|
||||
@@ -45,7 +49,7 @@ message UpdateProfileResponse {
|
||||
}
|
||||
|
||||
message DeleteProfileRequest {
|
||||
string id = 1;
|
||||
int64 id = 1;
|
||||
}
|
||||
message DeleteProfileResponse {}
|
||||
|
||||
42
proto/mantrae/v1/setting.proto
Normal file
42
proto/mantrae/v1/setting.proto
Normal file
@@ -0,0 +1,42 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package mantrae.v1;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service SettingService {
|
||||
rpc GetSetting(GetSettingRequest) returns (GetSettingResponse) {
|
||||
option idempotency_level = NO_SIDE_EFFECTS;
|
||||
}
|
||||
rpc UpdateSetting(UpdateSettingRequest) returns (UpdateSettingResponse);
|
||||
rpc ListSettings(ListSettingsRequest) returns (ListSettingsResponse) {
|
||||
option idempotency_level = NO_SIDE_EFFECTS;
|
||||
}
|
||||
}
|
||||
|
||||
message Setting {
|
||||
string key = 1;
|
||||
string value = 2;
|
||||
string description = 3;
|
||||
google.protobuf.Timestamp updated_at = 4;
|
||||
}
|
||||
|
||||
message GetSettingRequest {
|
||||
string key = 1;
|
||||
}
|
||||
message GetSettingResponse {
|
||||
Setting setting = 1;
|
||||
}
|
||||
|
||||
message UpdateSettingRequest {
|
||||
string key = 1;
|
||||
string value = 2;
|
||||
}
|
||||
message UpdateSettingResponse {
|
||||
Setting setting = 1;
|
||||
}
|
||||
|
||||
message ListSettingsRequest {}
|
||||
message ListSettingsResponse {
|
||||
repeated Setting settings = 1;
|
||||
}
|
||||
117
proto/mantrae/v1/user.proto
Normal file
117
proto/mantrae/v1/user.proto
Normal file
@@ -0,0 +1,117 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package mantrae.v1;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service UserService {
|
||||
rpc LoginUser(LoginUserRequest) returns (LoginUserResponse);
|
||||
rpc VerifyJWT(VerifyJWTRequest) returns (VerifyJWTResponse);
|
||||
rpc VerifyOTP(VerifyOTPRequest) returns (VerifyOTPResponse);
|
||||
rpc SendOTP(SendOTPRequest) returns (SendOTPResponse);
|
||||
rpc GetUser(GetUserRequest) returns (GetUserResponse) {
|
||||
option idempotency_level = NO_SIDE_EFFECTS;
|
||||
}
|
||||
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
|
||||
rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse);
|
||||
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse);
|
||||
rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) {
|
||||
option idempotency_level = NO_SIDE_EFFECTS;
|
||||
}
|
||||
}
|
||||
|
||||
message User {
|
||||
string id = 1;
|
||||
string username = 2;
|
||||
string password = 3;
|
||||
string email = 4;
|
||||
bool is_admin = 5;
|
||||
string otp = 6;
|
||||
google.protobuf.Timestamp otp_expiry = 7;
|
||||
google.protobuf.Timestamp last_login = 8;
|
||||
google.protobuf.Timestamp created_at = 9;
|
||||
google.protobuf.Timestamp updated_at = 10;
|
||||
}
|
||||
|
||||
message LoginUserRequest {
|
||||
oneof identifier {
|
||||
string username = 1;
|
||||
string email = 2;
|
||||
}
|
||||
string password = 3;
|
||||
bool remember = 4;
|
||||
}
|
||||
message LoginUserResponse {
|
||||
string token = 1;
|
||||
}
|
||||
|
||||
message VerifyJWTRequest {
|
||||
string token = 1;
|
||||
}
|
||||
message VerifyJWTResponse {
|
||||
string user_id = 1;
|
||||
}
|
||||
|
||||
message VerifyOTPRequest {
|
||||
oneof identifier {
|
||||
string username = 1;
|
||||
string email = 2;
|
||||
}
|
||||
string otp = 3;
|
||||
}
|
||||
message VerifyOTPResponse {
|
||||
string token = 1;
|
||||
}
|
||||
|
||||
message SendOTPRequest {
|
||||
oneof identifier {
|
||||
string username = 1;
|
||||
string email = 2;
|
||||
}
|
||||
}
|
||||
message SendOTPResponse {}
|
||||
|
||||
message GetUserRequest {
|
||||
oneof identifier {
|
||||
string id = 1;
|
||||
string username = 2;
|
||||
string email = 3;
|
||||
}
|
||||
}
|
||||
message GetUserResponse {
|
||||
User user = 1;
|
||||
}
|
||||
|
||||
message CreateUserRequest {
|
||||
string username = 1;
|
||||
string password = 2;
|
||||
string email = 3;
|
||||
bool is_admin = 4;
|
||||
}
|
||||
message CreateUserResponse {
|
||||
User user = 1;
|
||||
}
|
||||
|
||||
message UpdateUserRequest {
|
||||
string id = 1;
|
||||
string username = 2;
|
||||
string email = 3;
|
||||
bool is_admin = 4;
|
||||
}
|
||||
message UpdateUserResponse {
|
||||
User user = 1;
|
||||
}
|
||||
|
||||
message DeleteUserRequest {
|
||||
string id = 1;
|
||||
}
|
||||
message DeleteUserResponse {}
|
||||
|
||||
message ListUsersRequest {
|
||||
optional int64 limit = 1;
|
||||
optional int64 offset = 2;
|
||||
}
|
||||
message ListUsersResponse {
|
||||
repeated User users = 1;
|
||||
int64 total_count = 2;
|
||||
}
|
||||
40
sqlc.yml
40
sqlc.yml
@@ -14,6 +14,46 @@ sql:
|
||||
emit_pointers_for_null_types: true
|
||||
json_tags_case_style: "camel"
|
||||
overrides:
|
||||
- column: "http_routers.config"
|
||||
go_type:
|
||||
import: "github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
type: "Router"
|
||||
pointer: true
|
||||
- column: "tcp_routers.config"
|
||||
go_type:
|
||||
import: "github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
type: "TCPRouter"
|
||||
pointer: true
|
||||
- column: "udp_routers.config"
|
||||
go_type:
|
||||
import: "github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
type: "UDPRouter"
|
||||
pointer: true
|
||||
- column: "http_services.config"
|
||||
go_type:
|
||||
import: "github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
type: "Service"
|
||||
pointer: true
|
||||
- column: "tcp_services.config"
|
||||
go_type:
|
||||
import: "github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
type: "TCPService"
|
||||
pointer: true
|
||||
- column: "udp_services.config"
|
||||
go_type:
|
||||
import: "github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
type: "UDPService"
|
||||
pointer: true
|
||||
- column: "http_middlewares.config"
|
||||
go_type:
|
||||
import: "github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
type: "Middleware"
|
||||
pointer: true
|
||||
- column: "tcp_middlewares.config"
|
||||
go_type:
|
||||
import: "github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||
type: "TCPMiddleware"
|
||||
pointer: true
|
||||
- column: "traefik.config"
|
||||
go_type:
|
||||
type: "TraefikConfiguration"
|
||||
|
||||
171
web/src/lib/gen/mantrae/v1/agent_pb.ts
Normal file
171
web/src/lib/gen/mantrae/v1/agent_pb.ts
Normal file
@@ -0,0 +1,171 @@
|
||||
// @generated by protoc-gen-es v2.2.3 with parameter "target=ts"
|
||||
// @generated from file mantrae/v1/agent.proto (package mantrae.v1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
|
||||
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
|
||||
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file mantrae/v1/agent.proto.
|
||||
*/
|
||||
export const file_mantrae_v1_agent: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChZtYW50cmFlL3YxL2FnZW50LnByb3RvEgptYW50cmFlLnYxIrgCCglDb250YWluZXISCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCRIxCgZsYWJlbHMYAyADKAsyIS5tYW50cmFlLnYxLkNvbnRhaW5lci5MYWJlbHNFbnRyeRINCgVpbWFnZRgEIAEoCRIzCgdwb3J0bWFwGAUgAygLMiIubWFudHJhZS52MS5Db250YWluZXIuUG9ydG1hcEVudHJ5Eg4KBnN0YXR1cxgGIAEoCRIrCgdjcmVhdGVkGAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBGi4KDFBvcnRtYXBFbnRyeRILCgNrZXkYASABKAUSDQoFdmFsdWUYAiABKAU6AjgBIqcBChNHZXRDb250YWluZXJSZXF1ZXN0EhAKCGhvc3RuYW1lGAEgASgJEhEKCXB1YmxpY19pcBgCIAEoCRITCgtwcml2YXRlX2lwcxgDIAMoCRIpCgpjb250YWluZXJzGAQgAygLMhUubWFudHJhZS52MS5Db250YWluZXISKwoHdXBkYXRlZBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiFgoUR2V0Q29udGFpbmVyUmVzcG9uc2UiFAoSSGVhbHRoQ2hlY2tSZXF1ZXN0IjAKE0hlYWx0aENoZWNrUmVzcG9uc2USCgoCb2sYASABKAgSDQoFdG9rZW4YAiABKAkysQEKDEFnZW50U2VydmljZRJRCgxHZXRDb250YWluZXISHy5tYW50cmFlLnYxLkdldENvbnRhaW5lclJlcXVlc3QaIC5tYW50cmFlLnYxLkdldENvbnRhaW5lclJlc3BvbnNlEk4KC0hlYWx0aENoZWNrEh4ubWFudHJhZS52MS5IZWFsdGhDaGVja1JlcXVlc3QaHy5tYW50cmFlLnYxLkhlYWx0aENoZWNrUmVzcG9uc2VCpAEKDmNvbS5tYW50cmFlLnYxQgpBZ2VudFByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z", [file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.Container
|
||||
*/
|
||||
export type Container = Message<"mantrae.v1.Container"> & {
|
||||
/**
|
||||
* @generated from field: string id = 1;
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @generated from field: map<string, string> labels = 3;
|
||||
*/
|
||||
labels: { [key: string]: string };
|
||||
|
||||
/**
|
||||
* @generated from field: string image = 4;
|
||||
*/
|
||||
image: string;
|
||||
|
||||
/**
|
||||
* @generated from field: map<int32, int32> portmap = 5;
|
||||
*/
|
||||
portmap: { [key: number]: number };
|
||||
|
||||
/**
|
||||
* @generated from field: string status = 6;
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp created = 7;
|
||||
*/
|
||||
created?: Timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.Container.
|
||||
* Use `create(ContainerSchema)` to create a new message.
|
||||
*/
|
||||
export const ContainerSchema: GenMessage<Container> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_agent, 0);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetContainerRequest
|
||||
*/
|
||||
export type GetContainerRequest = Message<"mantrae.v1.GetContainerRequest"> & {
|
||||
/**
|
||||
* @generated from field: string hostname = 1;
|
||||
*/
|
||||
hostname: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string public_ip = 2;
|
||||
*/
|
||||
publicIp: string;
|
||||
|
||||
/**
|
||||
* @generated from field: repeated string private_ips = 3;
|
||||
*/
|
||||
privateIps: string[];
|
||||
|
||||
/**
|
||||
* @generated from field: repeated mantrae.v1.Container containers = 4;
|
||||
*/
|
||||
containers: Container[];
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp updated = 5;
|
||||
*/
|
||||
updated?: Timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetContainerRequest.
|
||||
* Use `create(GetContainerRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const GetContainerRequestSchema: GenMessage<GetContainerRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_agent, 1);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetContainerResponse
|
||||
*/
|
||||
export type GetContainerResponse = Message<"mantrae.v1.GetContainerResponse"> & {
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetContainerResponse.
|
||||
* Use `create(GetContainerResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const GetContainerResponseSchema: GenMessage<GetContainerResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_agent, 2);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.HealthCheckRequest
|
||||
*/
|
||||
export type HealthCheckRequest = Message<"mantrae.v1.HealthCheckRequest"> & {
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.HealthCheckRequest.
|
||||
* Use `create(HealthCheckRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const HealthCheckRequestSchema: GenMessage<HealthCheckRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_agent, 3);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.HealthCheckResponse
|
||||
*/
|
||||
export type HealthCheckResponse = Message<"mantrae.v1.HealthCheckResponse"> & {
|
||||
/**
|
||||
* @generated from field: bool ok = 1;
|
||||
*/
|
||||
ok: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: string token = 2;
|
||||
*/
|
||||
token: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.HealthCheckResponse.
|
||||
* Use `create(HealthCheckResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const HealthCheckResponseSchema: GenMessage<HealthCheckResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_agent, 4);
|
||||
|
||||
/**
|
||||
* @generated from service mantrae.v1.AgentService
|
||||
*/
|
||||
export const AgentService: GenService<{
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.AgentService.GetContainer
|
||||
*/
|
||||
getContainer: {
|
||||
methodKind: "unary";
|
||||
input: typeof GetContainerRequestSchema;
|
||||
output: typeof GetContainerResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.AgentService.HealthCheck
|
||||
*/
|
||||
healthCheck: {
|
||||
methodKind: "unary";
|
||||
input: typeof HealthCheckRequestSchema;
|
||||
output: typeof HealthCheckResponseSchema;
|
||||
},
|
||||
}> = /*@__PURE__*/
|
||||
serviceDesc(file_mantrae_v1_agent, 0);
|
||||
|
||||
306
web/src/lib/gen/mantrae/v1/entry_point_pb.ts
Normal file
306
web/src/lib/gen/mantrae/v1/entry_point_pb.ts
Normal file
@@ -0,0 +1,306 @@
|
||||
// @generated by protoc-gen-es v2.2.3 with parameter "target=ts"
|
||||
// @generated from file mantrae/v1/entry_point.proto (package mantrae.v1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
|
||||
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
|
||||
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file mantrae/v1/entry_point.proto.
|
||||
*/
|
||||
export const file_mantrae_v1_entry_point: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChxtYW50cmFlL3YxL2VudHJ5X3BvaW50LnByb3RvEgptYW50cmFlLnYxIqsBCgpFbnRyeVBvaW50EgoKAmlkGAEgASgDEgwKBG5hbWUYAiABKAkSDwoHYWRkcmVzcxgDIAEoCRISCgppc19kZWZhdWx0GAQgASgIEi4KCmNyZWF0ZWRfYXQYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIiIKFEdldEVudHJ5UG9pbnRSZXF1ZXN0EgoKAmlkGAEgASgDIkQKFUdldEVudHJ5UG9pbnRSZXNwb25zZRIrCgtlbnRyeV9wb2ludBgBIAEoCzIWLm1hbnRyYWUudjEuRW50cnlQb2ludCJMChdDcmVhdGVFbnRyeVBvaW50UmVxdWVzdBIMCgRuYW1lGAEgASgJEg8KB2FkZHJlc3MYAiABKAkSEgoKaXNfZGVmYXVsdBgDIAEoCCJHChhDcmVhdGVFbnRyeVBvaW50UmVzcG9uc2USKwoLZW50cnlfcG9pbnQYASABKAsyFi5tYW50cmFlLnYxLkVudHJ5UG9pbnQiWAoXVXBkYXRlRW50cnlQb2ludFJlcXVlc3QSCgoCaWQYASABKAMSDAoEbmFtZRgCIAEoCRIPCgdhZGRyZXNzGAMgASgJEhIKCmlzX2RlZmF1bHQYBCABKAgiRwoYVXBkYXRlRW50cnlQb2ludFJlc3BvbnNlEisKC2VudHJ5X3BvaW50GAEgASgLMhYubWFudHJhZS52MS5FbnRyeVBvaW50IiUKF0RlbGV0ZUVudHJ5UG9pbnRSZXF1ZXN0EgoKAmlkGAEgASgDIhoKGERlbGV0ZUVudHJ5UG9pbnRSZXNwb25zZSJWChZMaXN0RW50cnlQb2ludHNSZXF1ZXN0EhIKBWxpbWl0GAEgASgDSACIAQESEwoGb2Zmc2V0GAIgASgDSAGIAQFCCAoGX2xpbWl0QgkKB19vZmZzZXQiXAoXTGlzdEVudHJ5UG9pbnRzUmVzcG9uc2USLAoMZW50cnlfcG9pbnRzGAEgAygLMhYubWFudHJhZS52MS5FbnRyeVBvaW50EhMKC3RvdGFsX2NvdW50GAIgASgDMuwDChFFbnRyeVBvaW50U2VydmljZRJZCg1HZXRFbnRyeVBvaW50EiAubWFudHJhZS52MS5HZXRFbnRyeVBvaW50UmVxdWVzdBohLm1hbnRyYWUudjEuR2V0RW50cnlQb2ludFJlc3BvbnNlIgOQAgESXQoQQ3JlYXRlRW50cnlQb2ludBIjLm1hbnRyYWUudjEuQ3JlYXRlRW50cnlQb2ludFJlcXVlc3QaJC5tYW50cmFlLnYxLkNyZWF0ZUVudHJ5UG9pbnRSZXNwb25zZRJdChBVcGRhdGVFbnRyeVBvaW50EiMubWFudHJhZS52MS5VcGRhdGVFbnRyeVBvaW50UmVxdWVzdBokLm1hbnRyYWUudjEuVXBkYXRlRW50cnlQb2ludFJlc3BvbnNlEl0KEERlbGV0ZUVudHJ5UG9pbnQSIy5tYW50cmFlLnYxLkRlbGV0ZUVudHJ5UG9pbnRSZXF1ZXN0GiQubWFudHJhZS52MS5EZWxldGVFbnRyeVBvaW50UmVzcG9uc2USXwoPTGlzdEVudHJ5UG9pbnRzEiIubWFudHJhZS52MS5MaXN0RW50cnlQb2ludHNSZXF1ZXN0GiMubWFudHJhZS52MS5MaXN0RW50cnlQb2ludHNSZXNwb25zZSIDkAIBQqkBCg5jb20ubWFudHJhZS52MUIPRW50cnlQb2ludFByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z", [file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.EntryPoint
|
||||
*/
|
||||
export type EntryPoint = Message<"mantrae.v1.EntryPoint"> & {
|
||||
/**
|
||||
* @generated from field: int64 id = 1;
|
||||
*/
|
||||
id: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string address = 3;
|
||||
*/
|
||||
address: string;
|
||||
|
||||
/**
|
||||
* @generated from field: bool is_default = 4;
|
||||
*/
|
||||
isDefault: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp created_at = 5;
|
||||
*/
|
||||
createdAt?: Timestamp;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp updated_at = 6;
|
||||
*/
|
||||
updatedAt?: Timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.EntryPoint.
|
||||
* Use `create(EntryPointSchema)` to create a new message.
|
||||
*/
|
||||
export const EntryPointSchema: GenMessage<EntryPoint> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 0);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetEntryPointRequest
|
||||
*/
|
||||
export type GetEntryPointRequest = Message<"mantrae.v1.GetEntryPointRequest"> & {
|
||||
/**
|
||||
* @generated from field: int64 id = 1;
|
||||
*/
|
||||
id: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetEntryPointRequest.
|
||||
* Use `create(GetEntryPointRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const GetEntryPointRequestSchema: GenMessage<GetEntryPointRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 1);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetEntryPointResponse
|
||||
*/
|
||||
export type GetEntryPointResponse = Message<"mantrae.v1.GetEntryPointResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.EntryPoint entry_point = 1;
|
||||
*/
|
||||
entryPoint?: EntryPoint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetEntryPointResponse.
|
||||
* Use `create(GetEntryPointResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const GetEntryPointResponseSchema: GenMessage<GetEntryPointResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 2);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.CreateEntryPointRequest
|
||||
*/
|
||||
export type CreateEntryPointRequest = Message<"mantrae.v1.CreateEntryPointRequest"> & {
|
||||
/**
|
||||
* @generated from field: string name = 1;
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string address = 2;
|
||||
*/
|
||||
address: string;
|
||||
|
||||
/**
|
||||
* @generated from field: bool is_default = 3;
|
||||
*/
|
||||
isDefault: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.CreateEntryPointRequest.
|
||||
* Use `create(CreateEntryPointRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const CreateEntryPointRequestSchema: GenMessage<CreateEntryPointRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 3);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.CreateEntryPointResponse
|
||||
*/
|
||||
export type CreateEntryPointResponse = Message<"mantrae.v1.CreateEntryPointResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.EntryPoint entry_point = 1;
|
||||
*/
|
||||
entryPoint?: EntryPoint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.CreateEntryPointResponse.
|
||||
* Use `create(CreateEntryPointResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const CreateEntryPointResponseSchema: GenMessage<CreateEntryPointResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 4);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.UpdateEntryPointRequest
|
||||
*/
|
||||
export type UpdateEntryPointRequest = Message<"mantrae.v1.UpdateEntryPointRequest"> & {
|
||||
/**
|
||||
* @generated from field: int64 id = 1;
|
||||
*/
|
||||
id: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string address = 3;
|
||||
*/
|
||||
address: string;
|
||||
|
||||
/**
|
||||
* @generated from field: bool is_default = 4;
|
||||
*/
|
||||
isDefault: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.UpdateEntryPointRequest.
|
||||
* Use `create(UpdateEntryPointRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const UpdateEntryPointRequestSchema: GenMessage<UpdateEntryPointRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 5);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.UpdateEntryPointResponse
|
||||
*/
|
||||
export type UpdateEntryPointResponse = Message<"mantrae.v1.UpdateEntryPointResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.EntryPoint entry_point = 1;
|
||||
*/
|
||||
entryPoint?: EntryPoint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.UpdateEntryPointResponse.
|
||||
* Use `create(UpdateEntryPointResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const UpdateEntryPointResponseSchema: GenMessage<UpdateEntryPointResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 6);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.DeleteEntryPointRequest
|
||||
*/
|
||||
export type DeleteEntryPointRequest = Message<"mantrae.v1.DeleteEntryPointRequest"> & {
|
||||
/**
|
||||
* @generated from field: int64 id = 1;
|
||||
*/
|
||||
id: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.DeleteEntryPointRequest.
|
||||
* Use `create(DeleteEntryPointRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const DeleteEntryPointRequestSchema: GenMessage<DeleteEntryPointRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 7);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.DeleteEntryPointResponse
|
||||
*/
|
||||
export type DeleteEntryPointResponse = Message<"mantrae.v1.DeleteEntryPointResponse"> & {
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.DeleteEntryPointResponse.
|
||||
* Use `create(DeleteEntryPointResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const DeleteEntryPointResponseSchema: GenMessage<DeleteEntryPointResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 8);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.ListEntryPointsRequest
|
||||
*/
|
||||
export type ListEntryPointsRequest = Message<"mantrae.v1.ListEntryPointsRequest"> & {
|
||||
/**
|
||||
* @generated from field: optional int64 limit = 1;
|
||||
*/
|
||||
limit?: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: optional int64 offset = 2;
|
||||
*/
|
||||
offset?: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.ListEntryPointsRequest.
|
||||
* Use `create(ListEntryPointsRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const ListEntryPointsRequestSchema: GenMessage<ListEntryPointsRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 9);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.ListEntryPointsResponse
|
||||
*/
|
||||
export type ListEntryPointsResponse = Message<"mantrae.v1.ListEntryPointsResponse"> & {
|
||||
/**
|
||||
* @generated from field: repeated mantrae.v1.EntryPoint entry_points = 1;
|
||||
*/
|
||||
entryPoints: EntryPoint[];
|
||||
|
||||
/**
|
||||
* @generated from field: int64 total_count = 2;
|
||||
*/
|
||||
totalCount: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.ListEntryPointsResponse.
|
||||
* Use `create(ListEntryPointsResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const ListEntryPointsResponseSchema: GenMessage<ListEntryPointsResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_entry_point, 10);
|
||||
|
||||
/**
|
||||
* @generated from service mantrae.v1.EntryPointService
|
||||
*/
|
||||
export const EntryPointService: GenService<{
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.EntryPointService.GetEntryPoint
|
||||
*/
|
||||
getEntryPoint: {
|
||||
methodKind: "unary";
|
||||
input: typeof GetEntryPointRequestSchema;
|
||||
output: typeof GetEntryPointResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.EntryPointService.CreateEntryPoint
|
||||
*/
|
||||
createEntryPoint: {
|
||||
methodKind: "unary";
|
||||
input: typeof CreateEntryPointRequestSchema;
|
||||
output: typeof CreateEntryPointResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.EntryPointService.UpdateEntryPoint
|
||||
*/
|
||||
updateEntryPoint: {
|
||||
methodKind: "unary";
|
||||
input: typeof UpdateEntryPointRequestSchema;
|
||||
output: typeof UpdateEntryPointResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.EntryPointService.DeleteEntryPoint
|
||||
*/
|
||||
deleteEntryPoint: {
|
||||
methodKind: "unary";
|
||||
input: typeof DeleteEntryPointRequestSchema;
|
||||
output: typeof DeleteEntryPointResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.EntryPointService.ListEntryPoints
|
||||
*/
|
||||
listEntryPoints: {
|
||||
methodKind: "unary";
|
||||
input: typeof ListEntryPointsRequestSchema;
|
||||
output: typeof ListEntryPointsResponseSchema;
|
||||
},
|
||||
}> = /*@__PURE__*/
|
||||
serviceDesc(file_mantrae_v1_entry_point, 0);
|
||||
|
||||
291
web/src/lib/gen/mantrae/v1/profile_pb.ts
Normal file
291
web/src/lib/gen/mantrae/v1/profile_pb.ts
Normal file
@@ -0,0 +1,291 @@
|
||||
// @generated by protoc-gen-es v2.2.3 with parameter "target=ts"
|
||||
// @generated from file mantrae/v1/profile.proto (package mantrae.v1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
|
||||
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
|
||||
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file mantrae/v1/profile.proto.
|
||||
*/
|
||||
export const file_mantrae_v1_profile: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChhtYW50cmFlL3YxL3Byb2ZpbGUucHJvdG8SCm1hbnRyYWUudjEimAEKB1Byb2ZpbGUSCgoCaWQYASABKAMSDAoEbmFtZRgCIAEoCRITCgtkZXNjcmlwdGlvbhgDIAEoCRIuCgpjcmVhdGVkX2F0GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRhdGVkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCIfChFHZXRQcm9maWxlUmVxdWVzdBIKCgJpZBgBIAEoAyI6ChJHZXRQcm9maWxlUmVzcG9uc2USJAoHcHJvZmlsZRgBIAEoCzITLm1hbnRyYWUudjEuUHJvZmlsZSJOChRDcmVhdGVQcm9maWxlUmVxdWVzdBIMCgRuYW1lGAEgASgJEhgKC2Rlc2NyaXB0aW9uGAIgASgJSACIAQFCDgoMX2Rlc2NyaXB0aW9uIj0KFUNyZWF0ZVByb2ZpbGVSZXNwb25zZRIkCgdwcm9maWxlGAEgASgLMhMubWFudHJhZS52MS5Qcm9maWxlIloKFFVwZGF0ZVByb2ZpbGVSZXF1ZXN0EgoKAmlkGAEgASgDEgwKBG5hbWUYAiABKAkSGAoLZGVzY3JpcHRpb24YAyABKAlIAIgBAUIOCgxfZGVzY3JpcHRpb24iPQoVVXBkYXRlUHJvZmlsZVJlc3BvbnNlEiQKB3Byb2ZpbGUYASABKAsyEy5tYW50cmFlLnYxLlByb2ZpbGUiIgoURGVsZXRlUHJvZmlsZVJlcXVlc3QSCgoCaWQYASABKAMiFwoVRGVsZXRlUHJvZmlsZVJlc3BvbnNlIlMKE0xpc3RQcm9maWxlc1JlcXVlc3QSEgoFbGltaXQYASABKANIAIgBARITCgZvZmZzZXQYAiABKANIAYgBAUIICgZfbGltaXRCCQoHX29mZnNldCJSChRMaXN0UHJvZmlsZXNSZXNwb25zZRIlCghwcm9maWxlcxgBIAMoCzITLm1hbnRyYWUudjEuUHJvZmlsZRITCgt0b3RhbF9jb3VudBgCIAEoAzK8AwoOUHJvZmlsZVNlcnZpY2USUAoKR2V0UHJvZmlsZRIdLm1hbnRyYWUudjEuR2V0UHJvZmlsZVJlcXVlc3QaHi5tYW50cmFlLnYxLkdldFByb2ZpbGVSZXNwb25zZSIDkAIBElQKDUNyZWF0ZVByb2ZpbGUSIC5tYW50cmFlLnYxLkNyZWF0ZVByb2ZpbGVSZXF1ZXN0GiEubWFudHJhZS52MS5DcmVhdGVQcm9maWxlUmVzcG9uc2USVAoNVXBkYXRlUHJvZmlsZRIgLm1hbnRyYWUudjEuVXBkYXRlUHJvZmlsZVJlcXVlc3QaIS5tYW50cmFlLnYxLlVwZGF0ZVByb2ZpbGVSZXNwb25zZRJUCg1EZWxldGVQcm9maWxlEiAubWFudHJhZS52MS5EZWxldGVQcm9maWxlUmVxdWVzdBohLm1hbnRyYWUudjEuRGVsZXRlUHJvZmlsZVJlc3BvbnNlElYKDExpc3RQcm9maWxlcxIfLm1hbnRyYWUudjEuTGlzdFByb2ZpbGVzUmVxdWVzdBogLm1hbnRyYWUudjEuTGlzdFByb2ZpbGVzUmVzcG9uc2UiA5ACAUKmAQoOY29tLm1hbnRyYWUudjFCDFByb2ZpbGVQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.Profile
|
||||
*/
|
||||
export type Profile = Message<"mantrae.v1.Profile"> & {
|
||||
/**
|
||||
* @generated from field: int64 id = 1;
|
||||
*/
|
||||
id: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string description = 3;
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp created_at = 4;
|
||||
*/
|
||||
createdAt?: Timestamp;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp updated_at = 5;
|
||||
*/
|
||||
updatedAt?: Timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.Profile.
|
||||
* Use `create(ProfileSchema)` to create a new message.
|
||||
*/
|
||||
export const ProfileSchema: GenMessage<Profile> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 0);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetProfileRequest
|
||||
*/
|
||||
export type GetProfileRequest = Message<"mantrae.v1.GetProfileRequest"> & {
|
||||
/**
|
||||
* @generated from field: int64 id = 1;
|
||||
*/
|
||||
id: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetProfileRequest.
|
||||
* Use `create(GetProfileRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const GetProfileRequestSchema: GenMessage<GetProfileRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 1);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetProfileResponse
|
||||
*/
|
||||
export type GetProfileResponse = Message<"mantrae.v1.GetProfileResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.Profile profile = 1;
|
||||
*/
|
||||
profile?: Profile;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetProfileResponse.
|
||||
* Use `create(GetProfileResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const GetProfileResponseSchema: GenMessage<GetProfileResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 2);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.CreateProfileRequest
|
||||
*/
|
||||
export type CreateProfileRequest = Message<"mantrae.v1.CreateProfileRequest"> & {
|
||||
/**
|
||||
* @generated from field: string name = 1;
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @generated from field: optional string description = 2;
|
||||
*/
|
||||
description?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.CreateProfileRequest.
|
||||
* Use `create(CreateProfileRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const CreateProfileRequestSchema: GenMessage<CreateProfileRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 3);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.CreateProfileResponse
|
||||
*/
|
||||
export type CreateProfileResponse = Message<"mantrae.v1.CreateProfileResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.Profile profile = 1;
|
||||
*/
|
||||
profile?: Profile;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.CreateProfileResponse.
|
||||
* Use `create(CreateProfileResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const CreateProfileResponseSchema: GenMessage<CreateProfileResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 4);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.UpdateProfileRequest
|
||||
*/
|
||||
export type UpdateProfileRequest = Message<"mantrae.v1.UpdateProfileRequest"> & {
|
||||
/**
|
||||
* @generated from field: int64 id = 1;
|
||||
*/
|
||||
id: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: string name = 2;
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @generated from field: optional string description = 3;
|
||||
*/
|
||||
description?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.UpdateProfileRequest.
|
||||
* Use `create(UpdateProfileRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const UpdateProfileRequestSchema: GenMessage<UpdateProfileRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 5);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.UpdateProfileResponse
|
||||
*/
|
||||
export type UpdateProfileResponse = Message<"mantrae.v1.UpdateProfileResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.Profile profile = 1;
|
||||
*/
|
||||
profile?: Profile;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.UpdateProfileResponse.
|
||||
* Use `create(UpdateProfileResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const UpdateProfileResponseSchema: GenMessage<UpdateProfileResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 6);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.DeleteProfileRequest
|
||||
*/
|
||||
export type DeleteProfileRequest = Message<"mantrae.v1.DeleteProfileRequest"> & {
|
||||
/**
|
||||
* @generated from field: int64 id = 1;
|
||||
*/
|
||||
id: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.DeleteProfileRequest.
|
||||
* Use `create(DeleteProfileRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const DeleteProfileRequestSchema: GenMessage<DeleteProfileRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 7);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.DeleteProfileResponse
|
||||
*/
|
||||
export type DeleteProfileResponse = Message<"mantrae.v1.DeleteProfileResponse"> & {
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.DeleteProfileResponse.
|
||||
* Use `create(DeleteProfileResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const DeleteProfileResponseSchema: GenMessage<DeleteProfileResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 8);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.ListProfilesRequest
|
||||
*/
|
||||
export type ListProfilesRequest = Message<"mantrae.v1.ListProfilesRequest"> & {
|
||||
/**
|
||||
* @generated from field: optional int64 limit = 1;
|
||||
*/
|
||||
limit?: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: optional int64 offset = 2;
|
||||
*/
|
||||
offset?: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.ListProfilesRequest.
|
||||
* Use `create(ListProfilesRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const ListProfilesRequestSchema: GenMessage<ListProfilesRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 9);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.ListProfilesResponse
|
||||
*/
|
||||
export type ListProfilesResponse = Message<"mantrae.v1.ListProfilesResponse"> & {
|
||||
/**
|
||||
* @generated from field: repeated mantrae.v1.Profile profiles = 1;
|
||||
*/
|
||||
profiles: Profile[];
|
||||
|
||||
/**
|
||||
* @generated from field: int64 total_count = 2;
|
||||
*/
|
||||
totalCount: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.ListProfilesResponse.
|
||||
* Use `create(ListProfilesResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const ListProfilesResponseSchema: GenMessage<ListProfilesResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_profile, 10);
|
||||
|
||||
/**
|
||||
* @generated from service mantrae.v1.ProfileService
|
||||
*/
|
||||
export const ProfileService: GenService<{
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.ProfileService.GetProfile
|
||||
*/
|
||||
getProfile: {
|
||||
methodKind: "unary";
|
||||
input: typeof GetProfileRequestSchema;
|
||||
output: typeof GetProfileResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.ProfileService.CreateProfile
|
||||
*/
|
||||
createProfile: {
|
||||
methodKind: "unary";
|
||||
input: typeof CreateProfileRequestSchema;
|
||||
output: typeof CreateProfileResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.ProfileService.UpdateProfile
|
||||
*/
|
||||
updateProfile: {
|
||||
methodKind: "unary";
|
||||
input: typeof UpdateProfileRequestSchema;
|
||||
output: typeof UpdateProfileResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.ProfileService.DeleteProfile
|
||||
*/
|
||||
deleteProfile: {
|
||||
methodKind: "unary";
|
||||
input: typeof DeleteProfileRequestSchema;
|
||||
output: typeof DeleteProfileResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.ProfileService.ListProfiles
|
||||
*/
|
||||
listProfiles: {
|
||||
methodKind: "unary";
|
||||
input: typeof ListProfilesRequestSchema;
|
||||
output: typeof ListProfilesResponseSchema;
|
||||
},
|
||||
}> = /*@__PURE__*/
|
||||
serviceDesc(file_mantrae_v1_profile, 0);
|
||||
|
||||
182
web/src/lib/gen/mantrae/v1/setting_pb.ts
Normal file
182
web/src/lib/gen/mantrae/v1/setting_pb.ts
Normal file
@@ -0,0 +1,182 @@
|
||||
// @generated by protoc-gen-es v2.2.3 with parameter "target=ts"
|
||||
// @generated from file mantrae/v1/setting.proto (package mantrae.v1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
|
||||
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
|
||||
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file mantrae/v1/setting.proto.
|
||||
*/
|
||||
export const file_mantrae_v1_setting: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChhtYW50cmFlL3YxL3NldHRpbmcucHJvdG8SCm1hbnRyYWUudjEiagoHU2V0dGluZxILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAkSEwoLZGVzY3JpcHRpb24YAyABKAkSLgoKdXBkYXRlZF9hdBgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiIAoRR2V0U2V0dGluZ1JlcXVlc3QSCwoDa2V5GAEgASgJIjoKEkdldFNldHRpbmdSZXNwb25zZRIkCgdzZXR0aW5nGAEgASgLMhMubWFudHJhZS52MS5TZXR0aW5nIjIKFFVwZGF0ZVNldHRpbmdSZXF1ZXN0EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCSI9ChVVcGRhdGVTZXR0aW5nUmVzcG9uc2USJAoHc2V0dGluZxgBIAEoCzITLm1hbnRyYWUudjEuU2V0dGluZyIVChNMaXN0U2V0dGluZ3NSZXF1ZXN0Ij0KFExpc3RTZXR0aW5nc1Jlc3BvbnNlEiUKCHNldHRpbmdzGAEgAygLMhMubWFudHJhZS52MS5TZXR0aW5nMpACCg5TZXR0aW5nU2VydmljZRJQCgpHZXRTZXR0aW5nEh0ubWFudHJhZS52MS5HZXRTZXR0aW5nUmVxdWVzdBoeLm1hbnRyYWUudjEuR2V0U2V0dGluZ1Jlc3BvbnNlIgOQAgESVAoNVXBkYXRlU2V0dGluZxIgLm1hbnRyYWUudjEuVXBkYXRlU2V0dGluZ1JlcXVlc3QaIS5tYW50cmFlLnYxLlVwZGF0ZVNldHRpbmdSZXNwb25zZRJWCgxMaXN0U2V0dGluZ3MSHy5tYW50cmFlLnYxLkxpc3RTZXR0aW5nc1JlcXVlc3QaIC5tYW50cmFlLnYxLkxpc3RTZXR0aW5nc1Jlc3BvbnNlIgOQAgFCpgEKDmNvbS5tYW50cmFlLnYxQgxTZXR0aW5nUHJvdG9QAVo9Z2l0aHViLmNvbS9taXp1Y2hpbGFicy9tYW50cmFlL3Byb3RvL2dlbi9tYW50cmFlL3YxO21hbnRyYWV2MaICA01YWKoCCk1hbnRyYWUuVjHKAgpNYW50cmFlXFYx4gIWTWFudHJhZVxWMVxHUEJNZXRhZGF0YeoCC01hbnRyYWU6OlYxYgZwcm90bzM", [file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.Setting
|
||||
*/
|
||||
export type Setting = Message<"mantrae.v1.Setting"> & {
|
||||
/**
|
||||
* @generated from field: string key = 1;
|
||||
*/
|
||||
key: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string value = 2;
|
||||
*/
|
||||
value: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string description = 3;
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp updated_at = 4;
|
||||
*/
|
||||
updatedAt?: Timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.Setting.
|
||||
* Use `create(SettingSchema)` to create a new message.
|
||||
*/
|
||||
export const SettingSchema: GenMessage<Setting> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_setting, 0);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetSettingRequest
|
||||
*/
|
||||
export type GetSettingRequest = Message<"mantrae.v1.GetSettingRequest"> & {
|
||||
/**
|
||||
* @generated from field: string key = 1;
|
||||
*/
|
||||
key: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetSettingRequest.
|
||||
* Use `create(GetSettingRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const GetSettingRequestSchema: GenMessage<GetSettingRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_setting, 1);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetSettingResponse
|
||||
*/
|
||||
export type GetSettingResponse = Message<"mantrae.v1.GetSettingResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.Setting setting = 1;
|
||||
*/
|
||||
setting?: Setting;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetSettingResponse.
|
||||
* Use `create(GetSettingResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const GetSettingResponseSchema: GenMessage<GetSettingResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_setting, 2);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.UpdateSettingRequest
|
||||
*/
|
||||
export type UpdateSettingRequest = Message<"mantrae.v1.UpdateSettingRequest"> & {
|
||||
/**
|
||||
* @generated from field: string key = 1;
|
||||
*/
|
||||
key: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string value = 2;
|
||||
*/
|
||||
value: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.UpdateSettingRequest.
|
||||
* Use `create(UpdateSettingRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const UpdateSettingRequestSchema: GenMessage<UpdateSettingRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_setting, 3);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.UpdateSettingResponse
|
||||
*/
|
||||
export type UpdateSettingResponse = Message<"mantrae.v1.UpdateSettingResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.Setting setting = 1;
|
||||
*/
|
||||
setting?: Setting;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.UpdateSettingResponse.
|
||||
* Use `create(UpdateSettingResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const UpdateSettingResponseSchema: GenMessage<UpdateSettingResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_setting, 4);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.ListSettingsRequest
|
||||
*/
|
||||
export type ListSettingsRequest = Message<"mantrae.v1.ListSettingsRequest"> & {
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.ListSettingsRequest.
|
||||
* Use `create(ListSettingsRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const ListSettingsRequestSchema: GenMessage<ListSettingsRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_setting, 5);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.ListSettingsResponse
|
||||
*/
|
||||
export type ListSettingsResponse = Message<"mantrae.v1.ListSettingsResponse"> & {
|
||||
/**
|
||||
* @generated from field: repeated mantrae.v1.Setting settings = 1;
|
||||
*/
|
||||
settings: Setting[];
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.ListSettingsResponse.
|
||||
* Use `create(ListSettingsResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const ListSettingsResponseSchema: GenMessage<ListSettingsResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_setting, 6);
|
||||
|
||||
/**
|
||||
* @generated from service mantrae.v1.SettingService
|
||||
*/
|
||||
export const SettingService: GenService<{
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.SettingService.GetSetting
|
||||
*/
|
||||
getSetting: {
|
||||
methodKind: "unary";
|
||||
input: typeof GetSettingRequestSchema;
|
||||
output: typeof GetSettingResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.SettingService.UpdateSetting
|
||||
*/
|
||||
updateSetting: {
|
||||
methodKind: "unary";
|
||||
input: typeof UpdateSettingRequestSchema;
|
||||
output: typeof UpdateSettingResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.SettingService.ListSettings
|
||||
*/
|
||||
listSettings: {
|
||||
methodKind: "unary";
|
||||
input: typeof ListSettingsRequestSchema;
|
||||
output: typeof ListSettingsResponseSchema;
|
||||
},
|
||||
}> = /*@__PURE__*/
|
||||
serviceDesc(file_mantrae_v1_setting, 0);
|
||||
|
||||
564
web/src/lib/gen/mantrae/v1/user_pb.ts
Normal file
564
web/src/lib/gen/mantrae/v1/user_pb.ts
Normal file
@@ -0,0 +1,564 @@
|
||||
// @generated by protoc-gen-es v2.2.3 with parameter "target=ts"
|
||||
// @generated from file mantrae/v1/user.proto (package mantrae.v1, syntax proto3)
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
|
||||
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
|
||||
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* Describes the file mantrae/v1/user.proto.
|
||||
*/
|
||||
export const file_mantrae_v1_user: GenFile = /*@__PURE__*/
|
||||
fileDesc("ChVtYW50cmFlL3YxL3VzZXIucHJvdG8SCm1hbnRyYWUudjEipAIKBFVzZXISCgoCaWQYASABKAkSEAoIdXNlcm5hbWUYAiABKAkSEAoIcGFzc3dvcmQYAyABKAkSDQoFZW1haWwYBCABKAkSEAoIaXNfYWRtaW4YBSABKAgSCwoDb3RwGAYgASgJEi4KCm90cF9leHBpcnkYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmxhc3RfbG9naW4YCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmNyZWF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYCiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wImkKEExvZ2luVXNlclJlcXVlc3QSEgoIdXNlcm5hbWUYASABKAlIABIPCgVlbWFpbBgCIAEoCUgAEhAKCHBhc3N3b3JkGAMgASgJEhAKCHJlbWVtYmVyGAQgASgIQgwKCmlkZW50aWZpZXIiIgoRTG9naW5Vc2VyUmVzcG9uc2USDQoFdG9rZW4YASABKAkiIQoQVmVyaWZ5SldUUmVxdWVzdBINCgV0b2tlbhgBIAEoCSIkChFWZXJpZnlKV1RSZXNwb25zZRIPCgd1c2VyX2lkGAEgASgJIlIKEFZlcmlmeU9UUFJlcXVlc3QSEgoIdXNlcm5hbWUYASABKAlIABIPCgVlbWFpbBgCIAEoCUgAEgsKA290cBgDIAEoCUIMCgppZGVudGlmaWVyIiIKEVZlcmlmeU9UUFJlc3BvbnNlEg0KBXRva2VuGAEgASgJIkMKDlNlbmRPVFBSZXF1ZXN0EhIKCHVzZXJuYW1lGAEgASgJSAASDwoFZW1haWwYAiABKAlIAEIMCgppZGVudGlmaWVyIhEKD1NlbmRPVFBSZXNwb25zZSJRCg5HZXRVc2VyUmVxdWVzdBIMCgJpZBgBIAEoCUgAEhIKCHVzZXJuYW1lGAIgASgJSAASDwoFZW1haWwYAyABKAlIAEIMCgppZGVudGlmaWVyIjEKD0dldFVzZXJSZXNwb25zZRIeCgR1c2VyGAEgASgLMhAubWFudHJhZS52MS5Vc2VyIlgKEUNyZWF0ZVVzZXJSZXF1ZXN0EhAKCHVzZXJuYW1lGAEgASgJEhAKCHBhc3N3b3JkGAIgASgJEg0KBWVtYWlsGAMgASgJEhAKCGlzX2FkbWluGAQgASgIIjQKEkNyZWF0ZVVzZXJSZXNwb25zZRIeCgR1c2VyGAEgASgLMhAubWFudHJhZS52MS5Vc2VyIlIKEVVwZGF0ZVVzZXJSZXF1ZXN0EgoKAmlkGAEgASgJEhAKCHVzZXJuYW1lGAIgASgJEg0KBWVtYWlsGAMgASgJEhAKCGlzX2FkbWluGAQgASgIIjQKElVwZGF0ZVVzZXJSZXNwb25zZRIeCgR1c2VyGAEgASgLMhAubWFudHJhZS52MS5Vc2VyIh8KEURlbGV0ZVVzZXJSZXF1ZXN0EgoKAmlkGAEgASgJIhQKEkRlbGV0ZVVzZXJSZXNwb25zZSJQChBMaXN0VXNlcnNSZXF1ZXN0EhIKBWxpbWl0GAEgASgDSACIAQESEwoGb2Zmc2V0GAIgASgDSAGIAQFCCAoGX2xpbWl0QgkKB19vZmZzZXQiSQoRTGlzdFVzZXJzUmVzcG9uc2USHwoFdXNlcnMYASADKAsyEC5tYW50cmFlLnYxLlVzZXISEwoLdG90YWxfY291bnQYAiABKAMyrgUKC1VzZXJTZXJ2aWNlEkgKCUxvZ2luVXNlchIcLm1hbnRyYWUudjEuTG9naW5Vc2VyUmVxdWVzdBodLm1hbnRyYWUudjEuTG9naW5Vc2VyUmVzcG9uc2USSAoJVmVyaWZ5SldUEhwubWFudHJhZS52MS5WZXJpZnlKV1RSZXF1ZXN0Gh0ubWFudHJhZS52MS5WZXJpZnlKV1RSZXNwb25zZRJICglWZXJpZnlPVFASHC5tYW50cmFlLnYxLlZlcmlmeU9UUFJlcXVlc3QaHS5tYW50cmFlLnYxLlZlcmlmeU9UUFJlc3BvbnNlEkIKB1NlbmRPVFASGi5tYW50cmFlLnYxLlNlbmRPVFBSZXF1ZXN0GhsubWFudHJhZS52MS5TZW5kT1RQUmVzcG9uc2USRwoHR2V0VXNlchIaLm1hbnRyYWUudjEuR2V0VXNlclJlcXVlc3QaGy5tYW50cmFlLnYxLkdldFVzZXJSZXNwb25zZSIDkAIBEksKCkNyZWF0ZVVzZXISHS5tYW50cmFlLnYxLkNyZWF0ZVVzZXJSZXF1ZXN0Gh4ubWFudHJhZS52MS5DcmVhdGVVc2VyUmVzcG9uc2USSwoKVXBkYXRlVXNlchIdLm1hbnRyYWUudjEuVXBkYXRlVXNlclJlcXVlc3QaHi5tYW50cmFlLnYxLlVwZGF0ZVVzZXJSZXNwb25zZRJLCgpEZWxldGVVc2VyEh0ubWFudHJhZS52MS5EZWxldGVVc2VyUmVxdWVzdBoeLm1hbnRyYWUudjEuRGVsZXRlVXNlclJlc3BvbnNlEk0KCUxpc3RVc2VycxIcLm1hbnRyYWUudjEuTGlzdFVzZXJzUmVxdWVzdBodLm1hbnRyYWUudjEuTGlzdFVzZXJzUmVzcG9uc2UiA5ACAUKjAQoOY29tLm1hbnRyYWUudjFCCVVzZXJQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_google_protobuf_timestamp]);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.User
|
||||
*/
|
||||
export type User = Message<"mantrae.v1.User"> & {
|
||||
/**
|
||||
* @generated from field: string id = 1;
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string username = 2;
|
||||
*/
|
||||
username: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string password = 3;
|
||||
*/
|
||||
password: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string email = 4;
|
||||
*/
|
||||
email: string;
|
||||
|
||||
/**
|
||||
* @generated from field: bool is_admin = 5;
|
||||
*/
|
||||
isAdmin: boolean;
|
||||
|
||||
/**
|
||||
* @generated from field: string otp = 6;
|
||||
*/
|
||||
otp: string;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp otp_expiry = 7;
|
||||
*/
|
||||
otpExpiry?: Timestamp;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp last_login = 8;
|
||||
*/
|
||||
lastLogin?: Timestamp;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp created_at = 9;
|
||||
*/
|
||||
createdAt?: Timestamp;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp updated_at = 10;
|
||||
*/
|
||||
updatedAt?: Timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.User.
|
||||
* Use `create(UserSchema)` to create a new message.
|
||||
*/
|
||||
export const UserSchema: GenMessage<User> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 0);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.LoginUserRequest
|
||||
*/
|
||||
export type LoginUserRequest = Message<"mantrae.v1.LoginUserRequest"> & {
|
||||
/**
|
||||
* @generated from oneof mantrae.v1.LoginUserRequest.identifier
|
||||
*/
|
||||
identifier: {
|
||||
/**
|
||||
* @generated from field: string username = 1;
|
||||
*/
|
||||
value: string;
|
||||
case: "username";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: string email = 2;
|
||||
*/
|
||||
value: string;
|
||||
case: "email";
|
||||
} | { case: undefined; value?: undefined };
|
||||
|
||||
/**
|
||||
* @generated from field: string password = 3;
|
||||
*/
|
||||
password: string;
|
||||
|
||||
/**
|
||||
* @generated from field: bool remember = 4;
|
||||
*/
|
||||
remember: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.LoginUserRequest.
|
||||
* Use `create(LoginUserRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const LoginUserRequestSchema: GenMessage<LoginUserRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 1);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.LoginUserResponse
|
||||
*/
|
||||
export type LoginUserResponse = Message<"mantrae.v1.LoginUserResponse"> & {
|
||||
/**
|
||||
* @generated from field: string token = 1;
|
||||
*/
|
||||
token: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.LoginUserResponse.
|
||||
* Use `create(LoginUserResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const LoginUserResponseSchema: GenMessage<LoginUserResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 2);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.VerifyJWTRequest
|
||||
*/
|
||||
export type VerifyJWTRequest = Message<"mantrae.v1.VerifyJWTRequest"> & {
|
||||
/**
|
||||
* @generated from field: string token = 1;
|
||||
*/
|
||||
token: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.VerifyJWTRequest.
|
||||
* Use `create(VerifyJWTRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const VerifyJWTRequestSchema: GenMessage<VerifyJWTRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 3);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.VerifyJWTResponse
|
||||
*/
|
||||
export type VerifyJWTResponse = Message<"mantrae.v1.VerifyJWTResponse"> & {
|
||||
/**
|
||||
* @generated from field: string user_id = 1;
|
||||
*/
|
||||
userId: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.VerifyJWTResponse.
|
||||
* Use `create(VerifyJWTResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const VerifyJWTResponseSchema: GenMessage<VerifyJWTResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 4);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.VerifyOTPRequest
|
||||
*/
|
||||
export type VerifyOTPRequest = Message<"mantrae.v1.VerifyOTPRequest"> & {
|
||||
/**
|
||||
* @generated from oneof mantrae.v1.VerifyOTPRequest.identifier
|
||||
*/
|
||||
identifier: {
|
||||
/**
|
||||
* @generated from field: string username = 1;
|
||||
*/
|
||||
value: string;
|
||||
case: "username";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: string email = 2;
|
||||
*/
|
||||
value: string;
|
||||
case: "email";
|
||||
} | { case: undefined; value?: undefined };
|
||||
|
||||
/**
|
||||
* @generated from field: string otp = 3;
|
||||
*/
|
||||
otp: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.VerifyOTPRequest.
|
||||
* Use `create(VerifyOTPRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const VerifyOTPRequestSchema: GenMessage<VerifyOTPRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 5);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.VerifyOTPResponse
|
||||
*/
|
||||
export type VerifyOTPResponse = Message<"mantrae.v1.VerifyOTPResponse"> & {
|
||||
/**
|
||||
* @generated from field: string token = 1;
|
||||
*/
|
||||
token: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.VerifyOTPResponse.
|
||||
* Use `create(VerifyOTPResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const VerifyOTPResponseSchema: GenMessage<VerifyOTPResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 6);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.SendOTPRequest
|
||||
*/
|
||||
export type SendOTPRequest = Message<"mantrae.v1.SendOTPRequest"> & {
|
||||
/**
|
||||
* @generated from oneof mantrae.v1.SendOTPRequest.identifier
|
||||
*/
|
||||
identifier: {
|
||||
/**
|
||||
* @generated from field: string username = 1;
|
||||
*/
|
||||
value: string;
|
||||
case: "username";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: string email = 2;
|
||||
*/
|
||||
value: string;
|
||||
case: "email";
|
||||
} | { case: undefined; value?: undefined };
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.SendOTPRequest.
|
||||
* Use `create(SendOTPRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const SendOTPRequestSchema: GenMessage<SendOTPRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 7);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.SendOTPResponse
|
||||
*/
|
||||
export type SendOTPResponse = Message<"mantrae.v1.SendOTPResponse"> & {
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.SendOTPResponse.
|
||||
* Use `create(SendOTPResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const SendOTPResponseSchema: GenMessage<SendOTPResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 8);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetUserRequest
|
||||
*/
|
||||
export type GetUserRequest = Message<"mantrae.v1.GetUserRequest"> & {
|
||||
/**
|
||||
* @generated from oneof mantrae.v1.GetUserRequest.identifier
|
||||
*/
|
||||
identifier: {
|
||||
/**
|
||||
* @generated from field: string id = 1;
|
||||
*/
|
||||
value: string;
|
||||
case: "id";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: string username = 2;
|
||||
*/
|
||||
value: string;
|
||||
case: "username";
|
||||
} | {
|
||||
/**
|
||||
* @generated from field: string email = 3;
|
||||
*/
|
||||
value: string;
|
||||
case: "email";
|
||||
} | { case: undefined; value?: undefined };
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetUserRequest.
|
||||
* Use `create(GetUserRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const GetUserRequestSchema: GenMessage<GetUserRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 9);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.GetUserResponse
|
||||
*/
|
||||
export type GetUserResponse = Message<"mantrae.v1.GetUserResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.User user = 1;
|
||||
*/
|
||||
user?: User;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.GetUserResponse.
|
||||
* Use `create(GetUserResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const GetUserResponseSchema: GenMessage<GetUserResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 10);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.CreateUserRequest
|
||||
*/
|
||||
export type CreateUserRequest = Message<"mantrae.v1.CreateUserRequest"> & {
|
||||
/**
|
||||
* @generated from field: string username = 1;
|
||||
*/
|
||||
username: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string password = 2;
|
||||
*/
|
||||
password: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string email = 3;
|
||||
*/
|
||||
email: string;
|
||||
|
||||
/**
|
||||
* @generated from field: bool is_admin = 4;
|
||||
*/
|
||||
isAdmin: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.CreateUserRequest.
|
||||
* Use `create(CreateUserRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const CreateUserRequestSchema: GenMessage<CreateUserRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 11);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.CreateUserResponse
|
||||
*/
|
||||
export type CreateUserResponse = Message<"mantrae.v1.CreateUserResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.User user = 1;
|
||||
*/
|
||||
user?: User;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.CreateUserResponse.
|
||||
* Use `create(CreateUserResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const CreateUserResponseSchema: GenMessage<CreateUserResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 12);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.UpdateUserRequest
|
||||
*/
|
||||
export type UpdateUserRequest = Message<"mantrae.v1.UpdateUserRequest"> & {
|
||||
/**
|
||||
* @generated from field: string id = 1;
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string username = 2;
|
||||
*/
|
||||
username: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string email = 3;
|
||||
*/
|
||||
email: string;
|
||||
|
||||
/**
|
||||
* @generated from field: bool is_admin = 4;
|
||||
*/
|
||||
isAdmin: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.UpdateUserRequest.
|
||||
* Use `create(UpdateUserRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const UpdateUserRequestSchema: GenMessage<UpdateUserRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 13);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.UpdateUserResponse
|
||||
*/
|
||||
export type UpdateUserResponse = Message<"mantrae.v1.UpdateUserResponse"> & {
|
||||
/**
|
||||
* @generated from field: mantrae.v1.User user = 1;
|
||||
*/
|
||||
user?: User;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.UpdateUserResponse.
|
||||
* Use `create(UpdateUserResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const UpdateUserResponseSchema: GenMessage<UpdateUserResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 14);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.DeleteUserRequest
|
||||
*/
|
||||
export type DeleteUserRequest = Message<"mantrae.v1.DeleteUserRequest"> & {
|
||||
/**
|
||||
* @generated from field: string id = 1;
|
||||
*/
|
||||
id: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.DeleteUserRequest.
|
||||
* Use `create(DeleteUserRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const DeleteUserRequestSchema: GenMessage<DeleteUserRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 15);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.DeleteUserResponse
|
||||
*/
|
||||
export type DeleteUserResponse = Message<"mantrae.v1.DeleteUserResponse"> & {
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.DeleteUserResponse.
|
||||
* Use `create(DeleteUserResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const DeleteUserResponseSchema: GenMessage<DeleteUserResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 16);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.ListUsersRequest
|
||||
*/
|
||||
export type ListUsersRequest = Message<"mantrae.v1.ListUsersRequest"> & {
|
||||
/**
|
||||
* @generated from field: optional int64 limit = 1;
|
||||
*/
|
||||
limit?: bigint;
|
||||
|
||||
/**
|
||||
* @generated from field: optional int64 offset = 2;
|
||||
*/
|
||||
offset?: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.ListUsersRequest.
|
||||
* Use `create(ListUsersRequestSchema)` to create a new message.
|
||||
*/
|
||||
export const ListUsersRequestSchema: GenMessage<ListUsersRequest> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 17);
|
||||
|
||||
/**
|
||||
* @generated from message mantrae.v1.ListUsersResponse
|
||||
*/
|
||||
export type ListUsersResponse = Message<"mantrae.v1.ListUsersResponse"> & {
|
||||
/**
|
||||
* @generated from field: repeated mantrae.v1.User users = 1;
|
||||
*/
|
||||
users: User[];
|
||||
|
||||
/**
|
||||
* @generated from field: int64 total_count = 2;
|
||||
*/
|
||||
totalCount: bigint;
|
||||
};
|
||||
|
||||
/**
|
||||
* Describes the message mantrae.v1.ListUsersResponse.
|
||||
* Use `create(ListUsersResponseSchema)` to create a new message.
|
||||
*/
|
||||
export const ListUsersResponseSchema: GenMessage<ListUsersResponse> = /*@__PURE__*/
|
||||
messageDesc(file_mantrae_v1_user, 18);
|
||||
|
||||
/**
|
||||
* @generated from service mantrae.v1.UserService
|
||||
*/
|
||||
export const UserService: GenService<{
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.UserService.LoginUser
|
||||
*/
|
||||
loginUser: {
|
||||
methodKind: "unary";
|
||||
input: typeof LoginUserRequestSchema;
|
||||
output: typeof LoginUserResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.UserService.VerifyJWT
|
||||
*/
|
||||
verifyJWT: {
|
||||
methodKind: "unary";
|
||||
input: typeof VerifyJWTRequestSchema;
|
||||
output: typeof VerifyJWTResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.UserService.VerifyOTP
|
||||
*/
|
||||
verifyOTP: {
|
||||
methodKind: "unary";
|
||||
input: typeof VerifyOTPRequestSchema;
|
||||
output: typeof VerifyOTPResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.UserService.SendOTP
|
||||
*/
|
||||
sendOTP: {
|
||||
methodKind: "unary";
|
||||
input: typeof SendOTPRequestSchema;
|
||||
output: typeof SendOTPResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.UserService.GetUser
|
||||
*/
|
||||
getUser: {
|
||||
methodKind: "unary";
|
||||
input: typeof GetUserRequestSchema;
|
||||
output: typeof GetUserResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.UserService.CreateUser
|
||||
*/
|
||||
createUser: {
|
||||
methodKind: "unary";
|
||||
input: typeof CreateUserRequestSchema;
|
||||
output: typeof CreateUserResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.UserService.UpdateUser
|
||||
*/
|
||||
updateUser: {
|
||||
methodKind: "unary";
|
||||
input: typeof UpdateUserRequestSchema;
|
||||
output: typeof UpdateUserResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.UserService.DeleteUser
|
||||
*/
|
||||
deleteUser: {
|
||||
methodKind: "unary";
|
||||
input: typeof DeleteUserRequestSchema;
|
||||
output: typeof DeleteUserResponseSchema;
|
||||
},
|
||||
/**
|
||||
* @generated from rpc mantrae.v1.UserService.ListUsers
|
||||
*/
|
||||
listUsers: {
|
||||
methodKind: "unary";
|
||||
input: typeof ListUsersRequestSchema;
|
||||
output: typeof ListUsersResponseSchema;
|
||||
},
|
||||
}> = /*@__PURE__*/
|
||||
serviceDesc(file_mantrae_v1_user, 0);
|
||||
|
||||
Reference in New Issue
Block a user