Attempt 1
This commit is contained in:
36
WebApp/.env
Normal file
36
WebApp/.env
Normal file
@@ -0,0 +1,36 @@
|
||||
# Enviroment variables that will be available for every application
|
||||
|
||||
# General version of the system
|
||||
VERSION=0.1
|
||||
|
||||
# Optional prefix for logging
|
||||
LOG_PREFIX=[Pagerino]
|
||||
|
||||
# Main app container name
|
||||
SERVER_NAME=pagerino-app
|
||||
SERVER_API_PORT=50222
|
||||
|
||||
# General preferred connection timeout
|
||||
TIMEOUT=3s
|
||||
|
||||
WS_NAME=send
|
||||
WS_TIMEOUT=3s
|
||||
WS_SIZE=512
|
||||
CROSS_ORIGINS= # CSV format for all URLs that can communicate with web app
|
||||
|
||||
# === Basic
|
||||
APP_NAME=Pagerino
|
||||
LOG_PREFIX=[Pagerino Web]
|
||||
|
||||
DEV_MODE=true
|
||||
|
||||
# === Host settings
|
||||
WEB_PORT=8222
|
||||
|
||||
# === UX configs
|
||||
HOME_NAME=dashboard # Leave empty for default "/"
|
||||
SESSION_DURATION=12h # one authorization duration
|
||||
|
||||
|
||||
# === Secets & keys
|
||||
JWT_SECRET=7jkNtpI4mM2QSW23ZILh2z6v0+gvKadNXi8I8jThiHU=
|
||||
35
WebApp/Dockerfile
Executable file
35
WebApp/Dockerfile
Executable file
@@ -0,0 +1,35 @@
|
||||
# [0] Go build environment
|
||||
FROM golang:1.24.5-alpine3.21 AS builder
|
||||
WORKDIR /web-server
|
||||
|
||||
## Dependencies
|
||||
# Get
|
||||
COPY ./src/main/go.mod ./src/main/go.sum ./src/
|
||||
# Download
|
||||
RUN cd ./src && \
|
||||
go mod download
|
||||
|
||||
## Executable
|
||||
# Get
|
||||
COPY ./src/main/ ./src/
|
||||
# Build
|
||||
RUN cd ./src && \
|
||||
go build -o ../build/web_server
|
||||
|
||||
# [1] Final image -> new FS
|
||||
FROM alpine:latest
|
||||
WORKDIR /root/
|
||||
|
||||
# Add certs for net communication
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
||||
## Final build
|
||||
# Get
|
||||
COPY --from=builder /web-server/build ./build/
|
||||
COPY ./build/stylesheet.css ./layouts/
|
||||
COPY ./src/layouts ./layouts/
|
||||
COPY ./config ./config/
|
||||
COPY ./shared.env ./config/shared.env
|
||||
|
||||
# Run
|
||||
CMD ["./build/web_server"]
|
||||
38
WebApp/LICENCE
Normal file
38
WebApp/LICENCE
Normal file
@@ -0,0 +1,38 @@
|
||||
PAGERINO(tm) WEB APPLICATION LICENSE AGREEMENT
|
||||
|
||||
1. Parties & Purpose
|
||||
This License Agreement (“Agreement”) is entered into between GORAK Industries s.r.o., hereinafter “Licensor,” and [Client Name], hereinafter “Licensee,” for the use of the proprietary web application (“Software”) designed to work with specific provided and configured devices for the Pagerino(tm) system ("Devices").
|
||||
|
||||
2. Intended Use
|
||||
The Software is designed for operation within a private local area network environment ("Environment") together with Devices and optimized for use in such a setting. If the Licensee chooses to expose the Software to external networks, use unathorized devices, use any parts of the Pagerino(tm) system in undocumented ways, the Licensee assumes full responsibility for any resulting risks, data breaches, performance degradation, or service interruptions. The Licensor is not liable for damages or losses arising from such use.
|
||||
|
||||
3. Rights Granted
|
||||
Licensee may install and run the Software on approved internal servers and grant access to Licensee's authorized employees. Backup copies may be made for disaster recovery only. No rights are granted to modify, reverse-engineer, redistribute, rent, lease, or sublicense the Software.
|
||||
|
||||
4. Ownership
|
||||
All intellectual property rights, including source code, remain the sole property of the Licensor. This Agreement does not transfer ownership of the Software or any associated rights, except the limited right to use as stated herein.
|
||||
|
||||
5. Fees and Support
|
||||
The license fee covers the right to use the Software in its delivered state. Updates, upgrades, enhancements, and technical support are not included in the license fee and will be provided only under separate agreements and at prices determined by the Licensor’s company at the time of service. The Licensor is not obliged to provide updates or support unless explicitly agreed in writing.
|
||||
|
||||
6. Limitations
|
||||
|
||||
The Software’s performance and accuracy depend on the network environment and the connected devices’ compliance with supported protocols.
|
||||
|
||||
The Licensor is not liable for malfunctions caused by third-party hardware, network configuration errors, incompatible devices, or environmental factors outside its control.
|
||||
|
||||
In case of system relocation, hardware replacement, or major infrastructure changes, reinstallation or reconfiguration support is considered a billable service.
|
||||
|
||||
If the Licensee modifies the Software without authorization, the Licensor may terminate the Agreement immediately.
|
||||
|
||||
7. Liability
|
||||
The Software is provided “as-is.” To the maximum extent permitted under Czech law, the Licensor disclaims all warranties, whether express or implied, including fitness for a particular purpose. The Licensor’s liability for damages is limited to the amount actually paid for the license. Indirect, incidental, or consequential damages (including downtime, lost profits, or data loss) are excluded.
|
||||
|
||||
8. Term & Termination
|
||||
This license is granted as perpetual, allowing the Licensee to use the Software for an unlimited time, subject to compliance with this Agreement. The Licensee’s right to use the Software may be terminated by the Licensor only if the Licensee breaches the terms of this Agreement. Upon termination, the Licensee must cease all use of the Software and destroy all copies in its possession.
|
||||
|
||||
9. Governing Law & Jurisdiction
|
||||
This Agreement is governed by the laws of the Czech Republic. Any disputes will be resolved before the courts of Brno.
|
||||
|
||||
10. Language & Final Provisions
|
||||
This Agreement may be provided in multiple languages. In case of discrepancies, the Czech version shall prevail. This document contains the entire agreement between the parties concerning the Software.
|
||||
23
WebApp/Makefile
Normal file
23
WebApp/Makefile
Normal file
@@ -0,0 +1,23 @@
|
||||
# Variables
|
||||
CSS_INPUT:=./src/layouts/styles/global.css
|
||||
CSS_OUTPUT:=./build/stylesheet.css
|
||||
NAME:=web-app
|
||||
|
||||
all: css
|
||||
|
||||
# Build Tailwind
|
||||
css: ./src/layouts/**/*.css ./src/layouts/**/*.tmpl
|
||||
npx tailwindcss -i $(CSS_INPUT) -o $(CSS_OUTPUT) --minify
|
||||
|
||||
# Build App
|
||||
go: ./src/main/*.go
|
||||
go build -o ./build/$(NAME) ./src/main.go
|
||||
|
||||
run: css go
|
||||
./build/$(NAME)
|
||||
|
||||
# Clear build
|
||||
clean:
|
||||
rm -rf ./build/$(NAME) ./build/stylesheet.css
|
||||
|
||||
.PHONY: run clean all
|
||||
29
WebApp/README.md
Normal file
29
WebApp/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Pagerino: **Web server**
|
||||
|
||||
### Description
|
||||
|
||||
Dockerized server communicating with Pagerino applications to provide an interface.
|
||||
|
||||
### Features
|
||||
|
||||
Current working and in-progress capabilities include:
|
||||
- list all devices
|
||||
- add/modify/remove users, devices, roles and other objects
|
||||
- see user, device, role and other's properties
|
||||
- see live map view of devices
|
||||
|
||||
### Usage
|
||||
|
||||
The web app connects to other Pagerino applications after user authorization,
|
||||
so all of the accessed apps have to be running and reachable.
|
||||
|
||||
First build the Tailwind css:
|
||||
```make css```
|
||||
|
||||
Then to start the server with docker:
|
||||
```docker compose up```
|
||||
|
||||
Alternatively you can just run it normally:
|
||||
```make go && make run```
|
||||
|
||||
*Created by Olek \@ Gorak Industries*
|
||||
2
WebApp/build/stylesheet.css
Normal file
2
WebApp/build/stylesheet.css
Normal file
File diff suppressed because one or more lines are too long
13
WebApp/docker-compose.yml
Normal file
13
WebApp/docker-compose.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: '3.0'
|
||||
|
||||
services:
|
||||
web_server:
|
||||
build: .
|
||||
container_name: web_server
|
||||
networks:
|
||||
pagerino_net:
|
||||
restart: on-failure:3
|
||||
|
||||
networks:
|
||||
pagerino_net:
|
||||
external: true
|
||||
1133
WebApp/package-lock.json
generated
Normal file
1133
WebApp/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
6
WebApp/package.json
Normal file
6
WebApp/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@tailwindcss/cli": "^4.1.12",
|
||||
"tailwindcss": "^4.1.12"
|
||||
}
|
||||
}
|
||||
19
WebApp/page_list.md
Executable file
19
WebApp/page_list.md
Executable file
@@ -0,0 +1,19 @@
|
||||
## List of pages for web app:
|
||||
- Network page:
|
||||
- List of devices + one gate: expandable device info in vertical layout + link to device page
|
||||
- Search function with filters
|
||||
- Live map view: clickable devices linking to their page
|
||||
- Device page:
|
||||
- Full overview of device's properties and history logs
|
||||
- *Can message, assign task and ping device?*
|
||||
- Account page:
|
||||
- Properties
|
||||
- Name & password change
|
||||
- 2FA
|
||||
- Account deletion
|
||||
- Home/Personal page:
|
||||
- Assigned device & card status
|
||||
- Recent messages, mentions, tasks, logs
|
||||
- *Provides interface to send messages remotely through web?*
|
||||
- Analytics: Displays various insights about daily work & communication like: messages sent, tasks assigned/in-progress/completed...
|
||||
- Console attachment: at the bottom of any page if role is Admin
|
||||
44
WebApp/src/layouts/components/footer.tmpl
Normal file
44
WebApp/src/layouts/components/footer.tmpl
Normal file
@@ -0,0 +1,44 @@
|
||||
{{ define "footer" -}}
|
||||
<footer class="bg-gray-900 text-gray-300 mt-12">
|
||||
<div class="max-w-7xl mx-auto px-6 py-10">
|
||||
<div class="flex flex-col md:flex-row md:justify-between gap-8">
|
||||
|
||||
<!-- Company links -->
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-semibold text-white mb-3">More</h3>
|
||||
<ul class="space-y-2">
|
||||
<li><a href="https://gorak.eu/" class="hover:underline">About Us</a></li>
|
||||
<li><a href="https://gorak.eu/products/pagerino" class="hover:underline">Pagerino</a></li>
|
||||
<li><a href="https://gorak.eu/contact" class="hover:underline">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Help & Support -->
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-semibold text-white mb-3">Help & Support</h3>
|
||||
<ul class="space-y-2">
|
||||
<li><a href="https://gorak.eu/help" class="hover:underline">Help Center</a></li>
|
||||
<li><a href="https://gorak.eu/support" class="hover:underline">Technical Support</a></li>
|
||||
<li><a href="https://gorak.eu/faq#pagerino" class="hover:underline">FAQ</a></li>
|
||||
<li><a href="https://gorak.eu/status" class="hover:underline">System Status</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Legal -->
|
||||
<div class="flex-1">
|
||||
<h3 class="text-lg font-semibold text-white mb-3">Legal</h3>
|
||||
<ul class="space-y-2">
|
||||
<li><a href="/privacy" class="hover:underline">Privacy Policy</a></li>
|
||||
<li><a href="/terms" class="hover:underline">Terms of Service</a></li>
|
||||
<li><a href="/cookies" class="hover:underline">Cookie Policy</a></li>
|
||||
<li><a href="/compliance" class="hover:underline">Compliance</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-gray-700 mt-8 pt-6 text-center text-sm text-gray-500">
|
||||
© 2025 GORAK Industries s.r.o. All rights reserved.
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{{- end }}
|
||||
8
WebApp/src/layouts/components/meta.tmpl
Normal file
8
WebApp/src/layouts/components/meta.tmpl
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ define "meta" -}}
|
||||
<title>{{ .meta.Title }}</title>
|
||||
<link rel="icon" type="image/x-icon" href="/static/{{ if .meta.icon }}{{ .meta.icon }}{{ else }}favicon.ico{{ end }}">
|
||||
|
||||
<meta name="author" content="Olek" />
|
||||
<meta name="description"
|
||||
content={{ .meta.description }} />
|
||||
{{- end }}
|
||||
69
WebApp/src/layouts/components/navbar.tmpl
Normal file
69
WebApp/src/layouts/components/navbar.tmpl
Normal file
@@ -0,0 +1,69 @@
|
||||
{{ define "navbar" }}
|
||||
<nav class="fixed top-0 w-full bg-[var(--primary-bg)] shadow-md z-50 transition-all duration-300">
|
||||
<div id="navbar-inner" class="max-w-7xl mx-auto flex items-center justify-between px-4 py-3 md:py-4 transition-all duration-300">
|
||||
<!-- Logo -->
|
||||
<a href="/" class="flex items-center transition-all duration-300" id="logo-container">
|
||||
<img src="/static/logo.png" alt="Logo" class="h-12 md:h-16 transition-all duration-300" id="logo-img"/>
|
||||
<span class="ml-2 text-[var(--accent)] font-bold text-xl md:text-2xl">MyApp</span>
|
||||
</a>
|
||||
|
||||
<!-- Nav Links -->
|
||||
<ul class="hidden md:flex space-x-6 text-[var(--text-primary)] font-medium">
|
||||
<li><a href="/network" class="hover:text-[var(--accent)] transition-colors">Network</a></li>
|
||||
<li><a href="/map" class="hover:text-[var(--accent)] transition-colors">Map</a></li>
|
||||
<li><a href="/analytics" class="hover:text-[var(--accent)] transition-colors">Analytics</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- User / Login -->
|
||||
<div class="flex items-center space-x-4">
|
||||
{{- if .user.Authorized -}}
|
||||
<!-- Logged in -->
|
||||
<button id="user-btn" class="hidden md:flex items-center space-x-2 text-[var(--text-primary)] hover:text-[var(--accent)] transition-colors">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path d="M12 12c2.7 0 4.9-2.2 4.9-4.9S14.7 2.2 12 2.2 7.1 4.4 7.1 7.1 9.3 12 12 12zm0 2.2c-3.1 0-9.3 1.6-9.3 4.9v2.4h18.6v-2.4c0-3.3-6.2-4.9-9.3-4.9z"/>
|
||||
</svg>
|
||||
<span id="username-display">Account</span>
|
||||
</button>
|
||||
{{- else -}}
|
||||
<!-- Logged out -->
|
||||
<a id="login-btn" href="/login" class="text-[var(--accent)] font-semibold hover:text-[var(--accent-light)] transition-colors">Login</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
<!-- Mobile menu button -->
|
||||
<button class="md:hidden flex items-center text-[var(--text-primary)]">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<script>
|
||||
// Navbar collapsing behaviour
|
||||
const logoImg = document.getElementById('logo-img')
|
||||
const navbarInner = document.getElementById('navbar-inner')
|
||||
|
||||
let ticking = false;
|
||||
window.addEventListener('scroll', () => {
|
||||
if (!ticking) {
|
||||
window.requestAnimationFrame(() => {
|
||||
if (window.scrollY > navbarInner.offsetHeight) {
|
||||
logoImg.classList.add('h-8', 'md:h-10')
|
||||
logoImg.classList.remove('h-12', 'md:h-16')
|
||||
navbarInner.classList.add('py-2', 'md:py-3')
|
||||
navbarInner.classList.remove('py-3', 'md:py-4')
|
||||
} else {
|
||||
logoImg.classList.remove('h-8', 'md:h-10')
|
||||
logoImg.classList.add('h-12', 'md:h-16')
|
||||
navbarInner.classList.remove('py-2', 'md:py-3')
|
||||
navbarInner.classList.add('py-3', 'md:py-4')
|
||||
}
|
||||
|
||||
ticking = false;
|
||||
});
|
||||
ticking = true;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
51
WebApp/src/layouts/index.tmpl
Normal file
51
WebApp/src/layouts/index.tmpl
Normal file
@@ -0,0 +1,51 @@
|
||||
{{ define "layout" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link href="../../build/stylesheet.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
||||
|
||||
{{ template "meta" . }}
|
||||
</head>
|
||||
<body class="bg-gray-100">
|
||||
{{ template "navbar" . }}
|
||||
<main>
|
||||
{{ template "content" . }}
|
||||
</main>
|
||||
<footer>
|
||||
{{ template "footer" . }}
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
let socket; // Global socket variable
|
||||
|
||||
function initWebSocket() { //TODO Make connection persistent across all pages
|
||||
if (socket) return; // Single connection
|
||||
|
||||
socket = new WebSocket("ws://" + window.location.host + "/ws");
|
||||
|
||||
socket.onopen = function() {
|
||||
console.log("Connected to server");
|
||||
};
|
||||
|
||||
socket.onmessage = function(event) {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log("Message from server:", data);
|
||||
};
|
||||
|
||||
let retries = 0
|
||||
socket.onclose = function() {
|
||||
console.log("Disconnected");
|
||||
socket = null; // For reconnection
|
||||
setTimeout(initWebSocket, 1000)
|
||||
};
|
||||
}
|
||||
|
||||
window.addEventListener("load", initWebSocket);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
5
WebApp/src/layouts/pages/home.tmpl
Normal file
5
WebApp/src/layouts/pages/home.tmpl
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ define "content" -}}
|
||||
<h1>
|
||||
Hello, Pagerino User!
|
||||
</h1>
|
||||
{{- end }}
|
||||
11
WebApp/src/layouts/pages/login.tmpl
Normal file
11
WebApp/src/layouts/pages/login.tmpl
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ define "content" -}}
|
||||
<form method="POST" action="/login">
|
||||
<label>Username</label>
|
||||
<input type="text" name="username" required />
|
||||
|
||||
<label>Password</label>
|
||||
<input type="password" name="password" required />
|
||||
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
{{- end }}
|
||||
79
WebApp/src/layouts/styles/global.css
Normal file
79
WebApp/src/layouts/styles/global.css
Normal file
@@ -0,0 +1,79 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
/* Global theme variables */
|
||||
:root {
|
||||
/* Core palette */
|
||||
--color-bg: #f8f9fa; /* main background (soft white) */
|
||||
--color-bg-alt: #e9ecef; /* alternate background (slightly darker gray) */
|
||||
--color-surface: #111213; /* text surfaces or headers */
|
||||
--color-surface-alt: #1c1d1f;
|
||||
|
||||
/* Accent tones */
|
||||
--color-text: #111213; /* main text (almost black) */
|
||||
--color-text-muted: #555; /* muted text (medium gray) */
|
||||
--color-text-inverse: #f8f9fa; /* for buttons on dark backgrounds */
|
||||
|
||||
/* Feedback tones */
|
||||
--color-accent: #4f46e5; /* indigo-ish */
|
||||
--color-accent-hover: #6366f1;
|
||||
--color-accent-muted: #818cf8;
|
||||
|
||||
--color-success: #22c55e; /* green-500 */
|
||||
--color-warning: #eab308; /* yellow-500 */
|
||||
--color-danger: #ef4444; /* red-500 */
|
||||
}
|
||||
|
||||
/* Base reset / typography */
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
a {
|
||||
color: var(--color-accent);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
a:hover {
|
||||
color: var(--color-accent-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Muted text */
|
||||
/* .text-muted {
|
||||
color: var(--color-text-muted);
|
||||
} */
|
||||
|
||||
/* Card-like containers */
|
||||
/* .card {
|
||||
background-color: var(--color-bg-alt);
|
||||
border-radius: 0.75rem;
|
||||
padding: 1rem;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
|
||||
} */
|
||||
|
||||
/* Buttons */
|
||||
/* .btn {
|
||||
display: inline-block;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.5rem;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background-color: var(--color-accent);
|
||||
color: var(--color-text);
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background-color: var(--color-accent-hover);
|
||||
}
|
||||
|
||||
.btn-muted {
|
||||
background-color: var(--color-bg-alt);
|
||||
color: var(--color-text-muted);
|
||||
} */
|
||||
48
WebApp/src/main/go.mod
Normal file
48
WebApp/src/main/go.mod
Normal file
@@ -0,0 +1,48 @@
|
||||
module pagerino-web
|
||||
|
||||
go 1.23.0
|
||||
|
||||
toolchain go1.24.6
|
||||
|
||||
require (
|
||||
github.com/gin-gonic/gin v1.10.1
|
||||
github.com/joho/godotenv v1.5.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/kr/pretty v0.3.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/bytedance/sonic v1.11.6 // indirect
|
||||
github.com/bytedance/sonic/loader v0.1.1 // indirect
|
||||
github.com/cloudwego/base64x v0.1.4 // indirect
|
||||
github.com/cloudwego/iasm v0.2.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.20.0 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.3.0
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||
golang.org/x/arch v0.8.0 // indirect
|
||||
golang.org/x/crypto v0.39.0
|
||||
golang.org/x/net v0.41.0 // indirect
|
||||
golang.org/x/sys v0.33.0 // indirect
|
||||
golang.org/x/text v0.26.0 // indirect
|
||||
google.golang.org/grpc v1.75.0
|
||||
google.golang.org/protobuf v1.36.6
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
132
WebApp/src/main/go.sum
Normal file
132
WebApp/src/main/go.sum
Normal file
@@ -0,0 +1,132 @@
|
||||
github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
|
||||
github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
|
||||
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
|
||||
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
|
||||
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
|
||||
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
|
||||
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
|
||||
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ=
|
||||
github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=
|
||||
github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
|
||||
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
|
||||
github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
|
||||
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
||||
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
|
||||
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
|
||||
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
|
||||
golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
|
||||
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
|
||||
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
|
||||
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
||||
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
|
||||
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
|
||||
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 h1:pFyd6EwwL2TqFf8emdthzeX+gZE1ElRq3iM8pui4KBY=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
|
||||
google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
|
||||
google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
|
||||
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
||||
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
271
WebApp/src/main/main.go
Normal file
271
WebApp/src/main/main.go
Normal file
@@ -0,0 +1,271 @@
|
||||
/*
|
||||
Pagerino web application designed for management and various
|
||||
views of devices and system-related data.
|
||||
Author: Olek
|
||||
*/
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
api_common "pagerino-web/pager_api/common"
|
||||
api_user "pagerino-web/pager_api/user"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// App objects and data needed througout the program
|
||||
type AppData struct {
|
||||
ExitSig chan os.Signal
|
||||
ApiUserClient api_user.UserServiceClient
|
||||
Timeout time.Duration
|
||||
}
|
||||
|
||||
func (data *AppData) FindEnv(name string) string {
|
||||
val := os.Getenv(name)
|
||||
if val == "" {
|
||||
log.Println("Missing config value for: " + name)
|
||||
data.ExitSig <- os.Interrupt
|
||||
log.Fatalln("Shutting down...")
|
||||
}
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
// === Server Render Data ===
|
||||
|
||||
// Basic User information
|
||||
type UserData struct {
|
||||
Name string
|
||||
ID int64
|
||||
Authorized bool
|
||||
}
|
||||
|
||||
// Webpage metadata
|
||||
type PageMeta struct {
|
||||
Title string
|
||||
Description string
|
||||
IconFile string
|
||||
}
|
||||
|
||||
// === Utilities ===
|
||||
|
||||
// Shortcut to get split up URL from *gin.Context
|
||||
func SplitPath(ctx *gin.Context) []string {
|
||||
return strings.Split(ctx.Request.URL.EscapedPath(), "/")
|
||||
}
|
||||
|
||||
// === Helpers ===
|
||||
|
||||
// GenerateToken creates a signed JWT for a user
|
||||
func GenerateToken(username string) (string, error) {
|
||||
expiration, err := time.ParseDuration(os.Getenv("SESSION_DURATION"))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.RegisteredClaims{
|
||||
Subject: username,
|
||||
ExpiresAt: jwt.NewNumericDate(now.Add(expiration)),
|
||||
IssuedAt: jwt.NewNumericDate(now),
|
||||
Issuer: os.Getenv("APP_NAME"),
|
||||
})
|
||||
return token.SignedString(os.Getenv("JWT_SECRET"))
|
||||
}
|
||||
|
||||
// CheckAuth aborts with 401 if JWT is invalid or not present
|
||||
func CheckAuth(ctx *gin.Context) {
|
||||
auth_header := ctx.GetHeader("Authorization")
|
||||
if auth_header == "" { // No token -> login
|
||||
ctx.Redirect(http.StatusTemporaryRedirect, "/login")
|
||||
return
|
||||
}
|
||||
|
||||
// Expect "Bearer <token>"
|
||||
parts := strings.Split(auth_header, " ")
|
||||
if len(parts) != 2 || parts[0] != "Bearer" {
|
||||
ctx.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "Invalid token format"})
|
||||
return
|
||||
}
|
||||
|
||||
token_str := parts[1]
|
||||
claims := &jwt.RegisteredClaims{}
|
||||
|
||||
token, err := jwt.ParseWithClaims(token_str, claims, func(token *jwt.Token) (any, error) {
|
||||
return os.Getenv("JWT_SECRET"), nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
ctx.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"error": "Could not parse token"})
|
||||
log.Println("Failed to parse authentication token: " + token_str)
|
||||
return
|
||||
}
|
||||
|
||||
if !token.Valid { // Token expired -> login
|
||||
ctx.Redirect(http.StatusTemporaryRedirect, "/login")
|
||||
return
|
||||
}
|
||||
|
||||
// Store username in context for handlers/templates
|
||||
ctx.Set("username", claims.Subject)
|
||||
}
|
||||
|
||||
// === Handlers ===
|
||||
|
||||
// loginHandler is a handler for POST forms in "/login"
|
||||
func loginPost(ctx *gin.Context, app_data *AppData) {
|
||||
username := ctx.PostForm("username")
|
||||
password := ctx.PostForm("password")
|
||||
|
||||
db_pass, err := app_data.ApiUserClient.GetPassword(ctx,
|
||||
&api_common.StrIndex{Id: &api_common.StrIndex_Name{Name: username}},
|
||||
)
|
||||
if err != nil {
|
||||
ctx.AbortWithStatusJSON(
|
||||
http.StatusInternalServerError,
|
||||
gin.H{"error": "Could not fetch user password"},
|
||||
)
|
||||
log.Println("Failed to fetch user password from DB")
|
||||
return
|
||||
}
|
||||
|
||||
err = bcrypt.CompareHashAndPassword([]byte(db_pass.GetPassword()), []byte(password))
|
||||
if err != nil {
|
||||
ctx.AbortWithStatusJSON(
|
||||
http.StatusBadRequest,
|
||||
gin.H{"error": "User password does not match"},
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
token, err := GenerateToken(username)
|
||||
if err != nil {
|
||||
log.Println(" JWT generation fail")
|
||||
ctx.AbortWithStatusJSON(
|
||||
http.StatusInternalServerError,
|
||||
gin.H{"error": "Could not generate token"},
|
||||
)
|
||||
log.Println("Failed to generate user authentication token")
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Header("Authorization", "Bearer "+token)
|
||||
ctx.Status(http.StatusAccepted)
|
||||
}
|
||||
|
||||
func main() {
|
||||
// = Exit signal
|
||||
Data := AppData{
|
||||
ExitSig: make(chan os.Signal),
|
||||
}
|
||||
signal.Notify(Data.ExitSig, syscall.SIGINT, syscall.SIGTERM)
|
||||
|
||||
// = Load configs
|
||||
godotenv.Load("./config/app_config.env", "./config/shared.env", "./config/socket_config.env")
|
||||
|
||||
// = Setup logger
|
||||
log.SetFlags(log.Lmsgprefix | log.LUTC | log.Lshortfile)
|
||||
log.SetPrefix(Data.FindEnv("LOG_PREFIX") + " ")
|
||||
|
||||
// === Router
|
||||
router := gin.Default()
|
||||
|
||||
// Load assets and HTML templates
|
||||
router.Static("./layouts/static", "./layouts/static")
|
||||
router.LoadHTMLGlob("./layouts/**/*.tmpl")
|
||||
|
||||
HOME_NAME := os.Getenv("HOME_NAME")
|
||||
|
||||
// Redirect to home
|
||||
if HOME_NAME != "" {
|
||||
router.GET("/", func(ctx *gin.Context) {
|
||||
ctx.Redirect(http.StatusPermanentRedirect, "/"+HOME_NAME)
|
||||
})
|
||||
}
|
||||
|
||||
tmout, err := time.ParseDuration(Data.FindEnv("TIMEOUT"))
|
||||
if err != nil {
|
||||
log.Println("Format misconfiguration: TIMEOUT")
|
||||
return
|
||||
}
|
||||
|
||||
Data.Timeout = tmout
|
||||
|
||||
dial_opts := []grpc.DialOption{
|
||||
//grpc.WithBlock(),
|
||||
grpc.WithInsecure(),
|
||||
}
|
||||
grpc_client, err := grpc.Dial(
|
||||
"app_server:"+Data.FindEnv("SERVER_API_PORT"),
|
||||
dial_opts...,
|
||||
)
|
||||
if err != nil {
|
||||
log.Println("Failed to connect to gRPC API")
|
||||
return
|
||||
}
|
||||
Data.ApiUserClient = api_user.NewUserServiceClient(grpc_client)
|
||||
|
||||
// Create auth group
|
||||
auth_group := router.Group("/", CheckAuth)
|
||||
|
||||
// Starting home page
|
||||
auth_group.GET("/"+HOME_NAME, func(ctx *gin.Context) {
|
||||
var title string
|
||||
if HOME_NAME == "" {
|
||||
title = "Home"
|
||||
} else {
|
||||
title = strings.ToTitle(HOME_NAME)
|
||||
}
|
||||
|
||||
ctx.HTML(http.StatusOK, "home.tmpl", gin.H{
|
||||
"meta": PageMeta{
|
||||
Title: title,
|
||||
Description: "Pagerino system home page",
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
// Login page (escape auth handler)
|
||||
router.GET("/login", func(ctx *gin.Context) {
|
||||
ctx.HTML(http.StatusOK, "login.tmpl", gin.H{
|
||||
"meta": PageMeta{
|
||||
Title: "Login",
|
||||
Description: "Pagerino system login page",
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
// Login attempt handler
|
||||
router.POST("/login", func(ctx *gin.Context) {
|
||||
loginPost(ctx, &Data)
|
||||
})
|
||||
|
||||
// Run server in another thread for graceful shutdown
|
||||
go func() {
|
||||
if err := router.Run("localhost:" + Data.FindEnv("WEB_PORT")); err != nil && err != http.ErrServerClosed {
|
||||
log.Println("HTTP Server error: " + err.Error())
|
||||
}
|
||||
log.Println("HTTP server shutdown.")
|
||||
|
||||
Data.ExitSig <- syscall.SIGINT
|
||||
}()
|
||||
|
||||
// = Graceful shutdown
|
||||
<-Data.ExitSig
|
||||
log.Println("Shutting down...")
|
||||
}
|
||||
278
WebApp/src/main/pager_api/change/change.pb.go
Normal file
278
WebApp/src/main/pager_api/change/change.pb.go
Normal file
@@ -0,0 +1,278 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: change.proto
|
||||
|
||||
package api_change
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
common "server/app_comm/api/common"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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 ChageAllInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
OldValue string `protobuf:"bytes,1,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"`
|
||||
NewValue string `protobuf:"bytes,2,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"`
|
||||
TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
|
||||
Operation string `protobuf:"bytes,4,opt,name=operation,proto3" json:"operation,omitempty"`
|
||||
LogId int32 `protobuf:"varint,5,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ChageAllInfo) Reset() {
|
||||
*x = ChageAllInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_change_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ChageAllInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChageAllInfo) ProtoMessage() {}
|
||||
|
||||
func (x *ChageAllInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_change_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChageAllInfo.ProtoReflect.Descriptor instead.
|
||||
func (*ChageAllInfo) Descriptor() ([]byte, []int) {
|
||||
return file_change_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ChageAllInfo) GetOldValue() string {
|
||||
if x != nil {
|
||||
return x.OldValue
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ChageAllInfo) GetNewValue() string {
|
||||
if x != nil {
|
||||
return x.NewValue
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ChageAllInfo) GetTableName() string {
|
||||
if x != nil {
|
||||
return x.TableName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ChageAllInfo) GetOperation() string {
|
||||
if x != nil {
|
||||
return x.Operation
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ChageAllInfo) GetLogId() int32 {
|
||||
if x != nil {
|
||||
return x.LogId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Values struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
OldValue string `protobuf:"bytes,1,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"`
|
||||
NewValue string `protobuf:"bytes,2,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Values) Reset() {
|
||||
*x = Values{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_change_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Values) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Values) ProtoMessage() {}
|
||||
|
||||
func (x *Values) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_change_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Values.ProtoReflect.Descriptor instead.
|
||||
func (*Values) Descriptor() ([]byte, []int) {
|
||||
return file_change_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Values) GetOldValue() string {
|
||||
if x != nil {
|
||||
return x.OldValue
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Values) GetNewValue() string {
|
||||
if x != nil {
|
||||
return x.NewValue
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_change_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_change_proto_rawDesc = []byte{
|
||||
0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x1a,
|
||||
0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x01,
|
||||
0x0a, 0x0c, 0x43, 0x68, 0x61, 0x67, 0x65, 0x41, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b,
|
||||
0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e,
|
||||
0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x06,
|
||||
0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x5f, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x56, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x32, 0xc6, 0x01, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x44, 0x69, 0x66, 0x66, 0x12, 0x16, 0x2e,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x17, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f,
|
||||
0x2e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f,
|
||||
0x0a, 0x06, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x16, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72,
|
||||
0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x1a, 0x1d, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x67, 0x65, 0x41, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x16, 0x2e, 0x70, 0x61, 0x67,
|
||||
0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x1a, 0x15, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x27, 0x5a, 0x25, 0x73, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x3b, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_change_proto_rawDescOnce sync.Once
|
||||
file_change_proto_rawDescData = file_change_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_change_proto_rawDescGZIP() []byte {
|
||||
file_change_proto_rawDescOnce.Do(func() {
|
||||
file_change_proto_rawDescData = protoimpl.X.CompressGZIP(file_change_proto_rawDescData)
|
||||
})
|
||||
return file_change_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_change_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_change_proto_goTypes = []interface{}{
|
||||
(*ChageAllInfo)(nil), // 0: pagerino.change.ChageAllInfo
|
||||
(*Values)(nil), // 1: pagerino.change.Values
|
||||
(*common.Index)(nil), // 2: pagerino.common.Index
|
||||
(*common.Meta)(nil), // 3: pagerino.common.Meta
|
||||
}
|
||||
var file_change_proto_depIdxs = []int32{
|
||||
2, // 0: pagerino.change.ChangeService.GetDiff:input_type -> pagerino.common.Index
|
||||
2, // 1: pagerino.change.ChangeService.GetAll:input_type -> pagerino.common.Index
|
||||
2, // 2: pagerino.change.ChangeService.GetMeta:input_type -> pagerino.common.Index
|
||||
1, // 3: pagerino.change.ChangeService.GetDiff:output_type -> pagerino.change.Values
|
||||
0, // 4: pagerino.change.ChangeService.GetAll:output_type -> pagerino.change.ChageAllInfo
|
||||
3, // 5: pagerino.change.ChangeService.GetMeta:output_type -> pagerino.common.Meta
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_change_proto_init() }
|
||||
func file_change_proto_init() {
|
||||
if File_change_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_change_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChageAllInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_change_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Values); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_change_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_change_proto_goTypes,
|
||||
DependencyIndexes: file_change_proto_depIdxs,
|
||||
MessageInfos: file_change_proto_msgTypes,
|
||||
}.Build()
|
||||
File_change_proto = out.File
|
||||
file_change_proto_rawDesc = nil
|
||||
file_change_proto_goTypes = nil
|
||||
file_change_proto_depIdxs = nil
|
||||
}
|
||||
178
WebApp/src/main/pager_api/change/change_grpc.pb.go
Normal file
178
WebApp/src/main/pager_api/change/change_grpc.pb.go
Normal file
@@ -0,0 +1,178 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package api_change
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
common "server/app_comm/api/common"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// ChangeServiceClient is the client API for ChangeService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ChangeServiceClient interface {
|
||||
// === DB information
|
||||
GetDiff(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*Values, error)
|
||||
GetAll(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*ChageAllInfo, error)
|
||||
// Common
|
||||
GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error)
|
||||
}
|
||||
|
||||
type changeServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewChangeServiceClient(cc grpc.ClientConnInterface) ChangeServiceClient {
|
||||
return &changeServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *changeServiceClient) GetDiff(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*Values, error) {
|
||||
out := new(Values)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.change.ChangeService/GetDiff", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *changeServiceClient) GetAll(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*ChageAllInfo, error) {
|
||||
out := new(ChageAllInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.change.ChangeService/GetAll", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *changeServiceClient) GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error) {
|
||||
out := new(common.Meta)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.change.ChangeService/GetMeta", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ChangeServiceServer is the server API for ChangeService service.
|
||||
// All implementations must embed UnimplementedChangeServiceServer
|
||||
// for forward compatibility
|
||||
type ChangeServiceServer interface {
|
||||
// === DB information
|
||||
GetDiff(context.Context, *common.Index) (*Values, error)
|
||||
GetAll(context.Context, *common.Index) (*ChageAllInfo, error)
|
||||
// Common
|
||||
GetMeta(context.Context, *common.Index) (*common.Meta, error)
|
||||
mustEmbedUnimplementedChangeServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedChangeServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedChangeServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedChangeServiceServer) GetDiff(context.Context, *common.Index) (*Values, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetDiff not implemented")
|
||||
}
|
||||
func (UnimplementedChangeServiceServer) GetAll(context.Context, *common.Index) (*ChageAllInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented")
|
||||
}
|
||||
func (UnimplementedChangeServiceServer) GetMeta(context.Context, *common.Index) (*common.Meta, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
|
||||
}
|
||||
func (UnimplementedChangeServiceServer) mustEmbedUnimplementedChangeServiceServer() {}
|
||||
|
||||
// UnsafeChangeServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ChangeServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeChangeServiceServer interface {
|
||||
mustEmbedUnimplementedChangeServiceServer()
|
||||
}
|
||||
|
||||
func RegisterChangeServiceServer(s grpc.ServiceRegistrar, srv ChangeServiceServer) {
|
||||
s.RegisterService(&ChangeService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ChangeService_GetDiff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ChangeServiceServer).GetDiff(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.change.ChangeService/GetDiff",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ChangeServiceServer).GetDiff(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ChangeService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ChangeServiceServer).GetAll(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.change.ChangeService/GetAll",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ChangeServiceServer).GetAll(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ChangeService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ChangeServiceServer).GetMeta(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.change.ChangeService/GetMeta",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ChangeServiceServer).GetMeta(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ChangeService_ServiceDesc is the grpc.ServiceDesc for ChangeService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ChangeService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pagerino.change.ChangeService",
|
||||
HandlerType: (*ChangeServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetDiff",
|
||||
Handler: _ChangeService_GetDiff_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetAll",
|
||||
Handler: _ChangeService_GetAll_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMeta",
|
||||
Handler: _ChangeService_GetMeta_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "change.proto",
|
||||
}
|
||||
588
WebApp/src/main/pager_api/common/common.pb.go
Normal file
588
WebApp/src/main/pager_api/common/common.pb.go
Normal file
@@ -0,0 +1,588 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: common.proto
|
||||
|
||||
package api_common
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
// For custom logic responses
|
||||
type RequestCode int32
|
||||
|
||||
const (
|
||||
RequestCode_UNKNOWN RequestCode = 0
|
||||
RequestCode_OK RequestCode = 1
|
||||
RequestCode_UNAUTHORIZED RequestCode = 2
|
||||
RequestCode_NO_DATA RequestCode = 3
|
||||
RequestCode_INTERNAL_ERROR RequestCode = 4
|
||||
)
|
||||
|
||||
// Enum value maps for RequestCode.
|
||||
var (
|
||||
RequestCode_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "OK",
|
||||
2: "UNAUTHORIZED",
|
||||
3: "NO_DATA",
|
||||
4: "INTERNAL_ERROR",
|
||||
}
|
||||
RequestCode_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"OK": 1,
|
||||
"UNAUTHORIZED": 2,
|
||||
"NO_DATA": 3,
|
||||
"INTERNAL_ERROR": 4,
|
||||
}
|
||||
)
|
||||
|
||||
func (x RequestCode) Enum() *RequestCode {
|
||||
p := new(RequestCode)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x RequestCode) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (RequestCode) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_common_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (RequestCode) Type() protoreflect.EnumType {
|
||||
return &file_common_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x RequestCode) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RequestCode.Descriptor instead.
|
||||
func (RequestCode) EnumDescriptor() ([]byte, []int) {
|
||||
return file_common_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// === DB indexing
|
||||
type StrIndex struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Id:
|
||||
// *StrIndex_Num
|
||||
// *StrIndex_Name
|
||||
Id isStrIndex_Id `protobuf_oneof:"id"`
|
||||
}
|
||||
|
||||
func (x *StrIndex) Reset() {
|
||||
*x = StrIndex{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StrIndex) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*StrIndex) ProtoMessage() {}
|
||||
|
||||
func (x *StrIndex) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StrIndex.ProtoReflect.Descriptor instead.
|
||||
func (*StrIndex) Descriptor() ([]byte, []int) {
|
||||
return file_common_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (m *StrIndex) GetId() isStrIndex_Id {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StrIndex) GetNum() int32 {
|
||||
if x, ok := x.GetId().(*StrIndex_Num); ok {
|
||||
return x.Num
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *StrIndex) GetName() string {
|
||||
if x, ok := x.GetId().(*StrIndex_Name); ok {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type isStrIndex_Id interface {
|
||||
isStrIndex_Id()
|
||||
}
|
||||
|
||||
type StrIndex_Num struct {
|
||||
Num int32 `protobuf:"varint,1,opt,name=num,proto3,oneof"` // Database ID
|
||||
}
|
||||
|
||||
type StrIndex_Name struct {
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` // for external fields: username, euid, name...
|
||||
}
|
||||
|
||||
func (*StrIndex_Num) isStrIndex_Id() {}
|
||||
|
||||
func (*StrIndex_Name) isStrIndex_Id() {}
|
||||
|
||||
type Index struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Num int32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"` // Database ID
|
||||
}
|
||||
|
||||
func (x *Index) Reset() {
|
||||
*x = Index{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Index) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Index) ProtoMessage() {}
|
||||
|
||||
func (x *Index) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Index.ProtoReflect.Descriptor instead.
|
||||
func (*Index) Descriptor() ([]byte, []int) {
|
||||
return file_common_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Index) GetNum() int32 {
|
||||
if x != nil {
|
||||
return x.Num
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// === DB information
|
||||
type Meta struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Meta) Reset() {
|
||||
*x = Meta{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Meta) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Meta) ProtoMessage() {}
|
||||
|
||||
func (x *Meta) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Meta.ProtoReflect.Descriptor instead.
|
||||
func (*Meta) Descriptor() ([]byte, []int) {
|
||||
return file_common_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Meta) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Meta) GetCreatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type References struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // 32 IDs per page from most recent
|
||||
RefId []int32 `protobuf:"varint,2,rep,packed,name=ref_id,json=refId,proto3" json:"ref_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *References) Reset() {
|
||||
*x = References{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *References) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*References) ProtoMessage() {}
|
||||
|
||||
func (x *References) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use References.ProtoReflect.Descriptor instead.
|
||||
func (*References) Descriptor() ([]byte, []int) {
|
||||
return file_common_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *References) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *References) GetRefId() []int32 {
|
||||
if x != nil {
|
||||
return x.RefId
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Reference struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RefId int32 `protobuf:"varint,1,opt,name=ref_id,json=refId,proto3" json:"ref_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Reference) Reset() {
|
||||
*x = Reference{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Reference) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Reference) ProtoMessage() {}
|
||||
|
||||
func (x *Reference) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Reference.ProtoReflect.Descriptor instead.
|
||||
func (*Reference) Descriptor() ([]byte, []int) {
|
||||
return file_common_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *Reference) GetRefId() int32 {
|
||||
if x != nil {
|
||||
return x.RefId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Activity struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
LastOnline *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=last_online,json=lastOnline,proto3" json:"last_online,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Activity) Reset() {
|
||||
*x = Activity{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Activity) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Activity) ProtoMessage() {}
|
||||
|
||||
func (x *Activity) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Activity.ProtoReflect.Descriptor instead.
|
||||
func (*Activity) Descriptor() ([]byte, []int) {
|
||||
return file_common_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *Activity) GetLastOnline() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.LastOnline
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_common_proto_rawDesc = []byte{
|
||||
0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 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, 0x3a, 0x0a, 0x08, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x03,
|
||||
0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x03, 0x6e, 0x75, 0x6d,
|
||||
0x12, 0x14, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x05,
|
||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x22, 0x51, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12,
|
||||
0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 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, 0x22, 0x37, 0x0a, 0x0a, 0x52, 0x65,
|
||||
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06,
|
||||
0x72, 0x65, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x72, 0x65,
|
||||
0x66, 0x49, 0x64, 0x22, 0x22, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
|
||||
0x12, 0x15, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x05, 0x72, 0x65, 0x66, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76,
|
||||
0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x69,
|
||||
0x6e, 0x65, 0x18, 0x01, 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, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
|
||||
0x2a, 0x55, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02,
|
||||
0x4f, 0x4b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52,
|
||||
0x49, 0x5a, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x44, 0x41, 0x54,
|
||||
0x41, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f,
|
||||
0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x27, 0x5a, 0x25, 0x73, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_common_proto_rawDescOnce sync.Once
|
||||
file_common_proto_rawDescData = file_common_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_common_proto_rawDescGZIP() []byte {
|
||||
file_common_proto_rawDescOnce.Do(func() {
|
||||
file_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_proto_rawDescData)
|
||||
})
|
||||
return file_common_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_common_proto_goTypes = []interface{}{
|
||||
(RequestCode)(0), // 0: pagerino.common.RequestCode
|
||||
(*StrIndex)(nil), // 1: pagerino.common.StrIndex
|
||||
(*Index)(nil), // 2: pagerino.common.Index
|
||||
(*Meta)(nil), // 3: pagerino.common.Meta
|
||||
(*References)(nil), // 4: pagerino.common.References
|
||||
(*Reference)(nil), // 5: pagerino.common.Reference
|
||||
(*Activity)(nil), // 6: pagerino.common.Activity
|
||||
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
|
||||
}
|
||||
var file_common_proto_depIdxs = []int32{
|
||||
7, // 0: pagerino.common.Meta.created_at:type_name -> google.protobuf.Timestamp
|
||||
7, // 1: pagerino.common.Activity.last_online:type_name -> google.protobuf.Timestamp
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_common_proto_init() }
|
||||
func file_common_proto_init() {
|
||||
if File_common_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StrIndex); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Index); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Meta); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*References); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Reference); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Activity); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_common_proto_msgTypes[0].OneofWrappers = []interface{}{
|
||||
(*StrIndex_Num)(nil),
|
||||
(*StrIndex_Name)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_common_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_common_proto_goTypes,
|
||||
DependencyIndexes: file_common_proto_depIdxs,
|
||||
EnumInfos: file_common_proto_enumTypes,
|
||||
MessageInfos: file_common_proto_msgTypes,
|
||||
}.Build()
|
||||
File_common_proto = out.File
|
||||
file_common_proto_rawDesc = nil
|
||||
file_common_proto_goTypes = nil
|
||||
file_common_proto_depIdxs = nil
|
||||
}
|
||||
566
WebApp/src/main/pager_api/device/device.pb.go
Normal file
566
WebApp/src/main/pager_api/device/device.pb.go
Normal file
@@ -0,0 +1,566 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: device.proto
|
||||
|
||||
package api_device
|
||||
|
||||
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"
|
||||
common "server/app_comm/api/common"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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 Charge struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Charge float32 `protobuf:"fixed32,1,opt,name=charge,proto3" json:"charge,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Charge) Reset() {
|
||||
*x = Charge{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_device_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Charge) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Charge) ProtoMessage() {}
|
||||
|
||||
func (x *Charge) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_device_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Charge.ProtoReflect.Descriptor instead.
|
||||
func (*Charge) Descriptor() ([]byte, []int) {
|
||||
return file_device_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Charge) GetCharge() float32 {
|
||||
if x != nil {
|
||||
return x.Charge
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Location struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
|
||||
Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
|
||||
Altitude float32 `protobuf:"fixed32,3,opt,name=altitude,proto3" json:"altitude,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Location) Reset() {
|
||||
*x = Location{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_device_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Location) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Location) ProtoMessage() {}
|
||||
|
||||
func (x *Location) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_device_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Location.ProtoReflect.Descriptor instead.
|
||||
func (*Location) Descriptor() ([]byte, []int) {
|
||||
return file_device_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Location) GetLatitude() float64 {
|
||||
if x != nil {
|
||||
return x.Latitude
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Location) GetLongitude() float64 {
|
||||
if x != nil {
|
||||
return x.Longitude
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Location) GetAltitude() float32 {
|
||||
if x != nil {
|
||||
return x.Altitude
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeviceBaseInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Euid string `protobuf:"bytes,2,opt,name=euid,proto3" json:"euid,omitempty"`
|
||||
InternalStatus int32 `protobuf:"zigzag32,3,opt,name=internal_status,json=internalStatus,proto3" json:"internal_status,omitempty"`
|
||||
LastOnline *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_online,json=lastOnline,proto3" json:"last_online,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeviceBaseInfo) Reset() {
|
||||
*x = DeviceBaseInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_device_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeviceBaseInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeviceBaseInfo) ProtoMessage() {}
|
||||
|
||||
func (x *DeviceBaseInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_device_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeviceBaseInfo.ProtoReflect.Descriptor instead.
|
||||
func (*DeviceBaseInfo) Descriptor() ([]byte, []int) {
|
||||
return file_device_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *DeviceBaseInfo) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeviceBaseInfo) GetEuid() string {
|
||||
if x != nil {
|
||||
return x.Euid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeviceBaseInfo) GetInternalStatus() int32 {
|
||||
if x != nil {
|
||||
return x.InternalStatus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeviceBaseInfo) GetLastOnline() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.LastOnline
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeviceAllInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Euid string `protobuf:"bytes,2,opt,name=euid,proto3" json:"euid,omitempty"`
|
||||
InternalStatus int32 `protobuf:"zigzag32,3,opt,name=internal_status,json=internalStatus,proto3" json:"internal_status,omitempty"`
|
||||
NativeStatus string `protobuf:"bytes,4,opt,name=native_status,json=nativeStatus,proto3" json:"native_status,omitempty"`
|
||||
LastOnline *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_online,json=lastOnline,proto3" json:"last_online,omitempty"`
|
||||
FwVersion string `protobuf:"bytes,6,opt,name=fw_version,json=fwVersion,proto3" json:"fw_version,omitempty"`
|
||||
CardIds []int32 `protobuf:"varint,7,rep,packed,name=card_ids,json=cardIds,proto3" json:"card_ids,omitempty"`
|
||||
Charge float32 `protobuf:"fixed32,8,opt,name=charge,proto3" json:"charge,omitempty"`
|
||||
Latitude float64 `protobuf:"fixed64,9,opt,name=latitude,proto3" json:"latitude,omitempty"`
|
||||
Longitude float64 `protobuf:"fixed64,10,opt,name=longitude,proto3" json:"longitude,omitempty"`
|
||||
Altitude float32 `protobuf:"fixed32,11,opt,name=altitude,proto3" json:"altitude,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) Reset() {
|
||||
*x = DeviceAllInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_device_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeviceAllInfo) ProtoMessage() {}
|
||||
|
||||
func (x *DeviceAllInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_device_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeviceAllInfo.ProtoReflect.Descriptor instead.
|
||||
func (*DeviceAllInfo) Descriptor() ([]byte, []int) {
|
||||
return file_device_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetEuid() string {
|
||||
if x != nil {
|
||||
return x.Euid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetInternalStatus() int32 {
|
||||
if x != nil {
|
||||
return x.InternalStatus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetNativeStatus() string {
|
||||
if x != nil {
|
||||
return x.NativeStatus
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetLastOnline() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.LastOnline
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetFwVersion() string {
|
||||
if x != nil {
|
||||
return x.FwVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetCardIds() []int32 {
|
||||
if x != nil {
|
||||
return x.CardIds
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetCharge() float32 {
|
||||
if x != nil {
|
||||
return x.Charge
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetLatitude() float64 {
|
||||
if x != nil {
|
||||
return x.Latitude
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetLongitude() float64 {
|
||||
if x != nil {
|
||||
return x.Longitude
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeviceAllInfo) GetAltitude() float32 {
|
||||
if x != nil {
|
||||
return x.Altitude
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_device_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_device_proto_rawDesc = []byte{
|
||||
0x0a, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 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,
|
||||
0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20,
|
||||
0x0a, 0x06, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x72,
|
||||
0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65,
|
||||
0x22, 0x60, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08,
|
||||
0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67,
|
||||
0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e,
|
||||
0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75,
|
||||
0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75,
|
||||
0x64, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x61, 0x73,
|
||||
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x75, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a,
|
||||
0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x65, 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, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4f, 0x6e, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x22, 0xea, 0x02, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x41, 0x6c,
|
||||
0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x75, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x75, 0x69, 0x64, 0x12, 0x27, 0x0a,
|
||||
0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
|
||||
0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e,
|
||||
0x61, 0x74, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x6c,
|
||||
0x61, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 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, 0x0a, 0x6c, 0x61,
|
||||
0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x77, 0x5f, 0x76,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x77,
|
||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x61, 0x72, 0x64, 0x5f,
|
||||
0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x63, 0x61, 0x72, 0x64, 0x49,
|
||||
0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01,
|
||||
0x28, 0x02, 0x52, 0x06, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61,
|
||||
0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61,
|
||||
0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74,
|
||||
0x75, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69,
|
||||
0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
|
||||
0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
|
||||
0x32, 0x95, 0x06, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x70,
|
||||
0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53,
|
||||
0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69,
|
||||
0x6e, 0x6f, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x41, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x45, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1f, 0x2e,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e,
|
||||
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f,
|
||||
0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12, 0x19, 0x2e, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74,
|
||||
0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x17, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12,
|
||||
0x43, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19,
|
||||
0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65,
|
||||
0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x6f, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4e, 0x66, 0x63, 0x43, 0x61,
|
||||
0x72, 0x64, 0x49, 0x64, 0x73, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x46, 0x0a,
|
||||
0x0c, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x64, 0x73, 0x12, 0x19, 0x2e,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72,
|
||||
0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72,
|
||||
0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x74,
|
||||
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x73, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67,
|
||||
0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72,
|
||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
|
||||
0x65, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
|
||||
0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x73, 0x12, 0x19, 0x2e, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74,
|
||||
0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
|
||||
0x63, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19,
|
||||
0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65,
|
||||
0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65,
|
||||
0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74,
|
||||
0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x1a, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x07, 0x47,
|
||||
0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x1a, 0x15, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x27, 0x5a, 0x25, 0x73, 0x65, 0x72, 0x76,
|
||||
0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x3b, 0x61, 0x70, 0x69, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_device_proto_rawDescOnce sync.Once
|
||||
file_device_proto_rawDescData = file_device_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_device_proto_rawDescGZIP() []byte {
|
||||
file_device_proto_rawDescOnce.Do(func() {
|
||||
file_device_proto_rawDescData = protoimpl.X.CompressGZIP(file_device_proto_rawDescData)
|
||||
})
|
||||
return file_device_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_device_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_device_proto_goTypes = []interface{}{
|
||||
(*Charge)(nil), // 0: pagerino.device.Charge
|
||||
(*Location)(nil), // 1: pagerino.device.Location
|
||||
(*DeviceBaseInfo)(nil), // 2: pagerino.device.DeviceBaseInfo
|
||||
(*DeviceAllInfo)(nil), // 3: pagerino.device.DeviceAllInfo
|
||||
(*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp
|
||||
(*common.StrIndex)(nil), // 5: pagerino.common.StrIndex
|
||||
(*common.References)(nil), // 6: pagerino.common.References
|
||||
(*common.Activity)(nil), // 7: pagerino.common.Activity
|
||||
(*common.Meta)(nil), // 8: pagerino.common.Meta
|
||||
}
|
||||
var file_device_proto_depIdxs = []int32{
|
||||
4, // 0: pagerino.device.DeviceBaseInfo.last_online:type_name -> google.protobuf.Timestamp
|
||||
4, // 1: pagerino.device.DeviceAllInfo.last_online:type_name -> google.protobuf.Timestamp
|
||||
5, // 2: pagerino.device.DeviceService.GetAll:input_type -> pagerino.common.StrIndex
|
||||
5, // 3: pagerino.device.DeviceService.GetInfo:input_type -> pagerino.common.StrIndex
|
||||
5, // 4: pagerino.device.DeviceService.GetCharge:input_type -> pagerino.common.StrIndex
|
||||
5, // 5: pagerino.device.DeviceService.GetLocation:input_type -> pagerino.common.StrIndex
|
||||
5, // 6: pagerino.device.DeviceService.GetNfcCardIds:input_type -> pagerino.common.StrIndex
|
||||
5, // 7: pagerino.device.DeviceService.GetStatusIds:input_type -> pagerino.common.StrIndex
|
||||
5, // 8: pagerino.device.DeviceService.GetSentMessageIds:input_type -> pagerino.common.StrIndex
|
||||
5, // 9: pagerino.device.DeviceService.GetReceivedMessageIds:input_type -> pagerino.common.StrIndex
|
||||
5, // 10: pagerino.device.DeviceService.GetLogs:input_type -> pagerino.common.StrIndex
|
||||
5, // 11: pagerino.device.DeviceService.GetActivity:input_type -> pagerino.common.StrIndex
|
||||
5, // 12: pagerino.device.DeviceService.GetMeta:input_type -> pagerino.common.StrIndex
|
||||
3, // 13: pagerino.device.DeviceService.GetAll:output_type -> pagerino.device.DeviceAllInfo
|
||||
2, // 14: pagerino.device.DeviceService.GetInfo:output_type -> pagerino.device.DeviceBaseInfo
|
||||
0, // 15: pagerino.device.DeviceService.GetCharge:output_type -> pagerino.device.Charge
|
||||
1, // 16: pagerino.device.DeviceService.GetLocation:output_type -> pagerino.device.Location
|
||||
6, // 17: pagerino.device.DeviceService.GetNfcCardIds:output_type -> pagerino.common.References
|
||||
6, // 18: pagerino.device.DeviceService.GetStatusIds:output_type -> pagerino.common.References
|
||||
6, // 19: pagerino.device.DeviceService.GetSentMessageIds:output_type -> pagerino.common.References
|
||||
6, // 20: pagerino.device.DeviceService.GetReceivedMessageIds:output_type -> pagerino.common.References
|
||||
6, // 21: pagerino.device.DeviceService.GetLogs:output_type -> pagerino.common.References
|
||||
7, // 22: pagerino.device.DeviceService.GetActivity:output_type -> pagerino.common.Activity
|
||||
8, // 23: pagerino.device.DeviceService.GetMeta:output_type -> pagerino.common.Meta
|
||||
13, // [13:24] is the sub-list for method output_type
|
||||
2, // [2:13] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_device_proto_init() }
|
||||
func file_device_proto_init() {
|
||||
if File_device_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_device_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Charge); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_device_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Location); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_device_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceBaseInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_device_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceAllInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_device_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_device_proto_goTypes,
|
||||
DependencyIndexes: file_device_proto_depIdxs,
|
||||
MessageInfos: file_device_proto_msgTypes,
|
||||
}.Build()
|
||||
File_device_proto = out.File
|
||||
file_device_proto_rawDesc = nil
|
||||
file_device_proto_goTypes = nil
|
||||
file_device_proto_depIdxs = nil
|
||||
}
|
||||
468
WebApp/src/main/pager_api/device/device_grpc.pb.go
Normal file
468
WebApp/src/main/pager_api/device/device_grpc.pb.go
Normal file
@@ -0,0 +1,468 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package api_device
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
common "server/app_comm/api/common"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// DeviceServiceClient is the client API for DeviceService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type DeviceServiceClient interface {
|
||||
// === DB information
|
||||
GetAll(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*DeviceAllInfo, error)
|
||||
GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*DeviceBaseInfo, error)
|
||||
GetCharge(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Charge, error)
|
||||
GetLocation(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Location, error)
|
||||
// References
|
||||
GetNfcCardIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
GetStatusIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
GetSentMessageIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
GetReceivedMessageIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
GetLogs(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
// Common
|
||||
GetActivity(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Activity, error)
|
||||
GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error)
|
||||
}
|
||||
|
||||
type deviceServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDeviceServiceClient(cc grpc.ClientConnInterface) DeviceServiceClient {
|
||||
return &deviceServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetAll(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*DeviceAllInfo, error) {
|
||||
out := new(DeviceAllInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetAll", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*DeviceBaseInfo, error) {
|
||||
out := new(DeviceBaseInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetCharge(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Charge, error) {
|
||||
out := new(Charge)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetCharge", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetLocation(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Location, error) {
|
||||
out := new(Location)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetLocation", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetNfcCardIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetNfcCardIds", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetStatusIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetStatusIds", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetSentMessageIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetSentMessageIds", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetReceivedMessageIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetReceivedMessageIds", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetLogs(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetLogs", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetActivity(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Activity, error) {
|
||||
out := new(common.Activity)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetActivity", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deviceServiceClient) GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error) {
|
||||
out := new(common.Meta)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.device.DeviceService/GetMeta", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DeviceServiceServer is the server API for DeviceService service.
|
||||
// All implementations must embed UnimplementedDeviceServiceServer
|
||||
// for forward compatibility
|
||||
type DeviceServiceServer interface {
|
||||
// === DB information
|
||||
GetAll(context.Context, *common.StrIndex) (*DeviceAllInfo, error)
|
||||
GetInfo(context.Context, *common.StrIndex) (*DeviceBaseInfo, error)
|
||||
GetCharge(context.Context, *common.StrIndex) (*Charge, error)
|
||||
GetLocation(context.Context, *common.StrIndex) (*Location, error)
|
||||
// References
|
||||
GetNfcCardIds(context.Context, *common.StrIndex) (*common.References, error)
|
||||
GetStatusIds(context.Context, *common.StrIndex) (*common.References, error)
|
||||
GetSentMessageIds(context.Context, *common.StrIndex) (*common.References, error)
|
||||
GetReceivedMessageIds(context.Context, *common.StrIndex) (*common.References, error)
|
||||
GetLogs(context.Context, *common.StrIndex) (*common.References, error)
|
||||
// Common
|
||||
GetActivity(context.Context, *common.StrIndex) (*common.Activity, error)
|
||||
GetMeta(context.Context, *common.StrIndex) (*common.Meta, error)
|
||||
mustEmbedUnimplementedDeviceServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedDeviceServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedDeviceServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedDeviceServiceServer) GetAll(context.Context, *common.StrIndex) (*DeviceAllInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetInfo(context.Context, *common.StrIndex) (*DeviceBaseInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetCharge(context.Context, *common.StrIndex) (*Charge, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCharge not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetLocation(context.Context, *common.StrIndex) (*Location, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetLocation not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetNfcCardIds(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetNfcCardIds not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetStatusIds(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetStatusIds not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetSentMessageIds(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSentMessageIds not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetReceivedMessageIds(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetReceivedMessageIds not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetLogs(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetActivity(context.Context, *common.StrIndex) (*common.Activity, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetActivity not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) GetMeta(context.Context, *common.StrIndex) (*common.Meta, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
|
||||
}
|
||||
func (UnimplementedDeviceServiceServer) mustEmbedUnimplementedDeviceServiceServer() {}
|
||||
|
||||
// UnsafeDeviceServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DeviceServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDeviceServiceServer interface {
|
||||
mustEmbedUnimplementedDeviceServiceServer()
|
||||
}
|
||||
|
||||
func RegisterDeviceServiceServer(s grpc.ServiceRegistrar, srv DeviceServiceServer) {
|
||||
s.RegisterService(&DeviceService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _DeviceService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetAll(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetAll",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetAll(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetInfo(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetCharge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetCharge(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetCharge",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetCharge(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetLocation(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetLocation",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetLocation(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetNfcCardIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetNfcCardIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetNfcCardIds",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetNfcCardIds(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetStatusIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetStatusIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetStatusIds",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetStatusIds(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetSentMessageIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetSentMessageIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetSentMessageIds",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetSentMessageIds(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetReceivedMessageIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetReceivedMessageIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetReceivedMessageIds",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetReceivedMessageIds(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetLogs(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetLogs",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetLogs(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetActivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetActivity(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetActivity",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetActivity(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeviceService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeviceServiceServer).GetMeta(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.device.DeviceService/GetMeta",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeviceServiceServer).GetMeta(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// DeviceService_ServiceDesc is the grpc.ServiceDesc for DeviceService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var DeviceService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pagerino.device.DeviceService",
|
||||
HandlerType: (*DeviceServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetAll",
|
||||
Handler: _DeviceService_GetAll_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetInfo",
|
||||
Handler: _DeviceService_GetInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCharge",
|
||||
Handler: _DeviceService_GetCharge_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetLocation",
|
||||
Handler: _DeviceService_GetLocation_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetNfcCardIds",
|
||||
Handler: _DeviceService_GetNfcCardIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetStatusIds",
|
||||
Handler: _DeviceService_GetStatusIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetSentMessageIds",
|
||||
Handler: _DeviceService_GetSentMessageIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetReceivedMessageIds",
|
||||
Handler: _DeviceService_GetReceivedMessageIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetLogs",
|
||||
Handler: _DeviceService_GetLogs_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetActivity",
|
||||
Handler: _DeviceService_GetActivity_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMeta",
|
||||
Handler: _DeviceService_GetMeta_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "device.proto",
|
||||
}
|
||||
81
WebApp/src/main/pager_api/log/log.pb.go
Normal file
81
WebApp/src/main/pager_api/log/log.pb.go
Normal file
@@ -0,0 +1,81 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: log.proto
|
||||
|
||||
package api_log
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
common "server/app_comm/api/common"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
var File_log_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_log_proto_rawDesc = []byte{
|
||||
0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x70, 0x61, 0x67,
|
||||
0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x6c, 0x6f, 0x67, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x8b, 0x01, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x49, 0x64, 0x73, 0x12, 0x16, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1b,
|
||||
0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x07, 0x47,
|
||||
0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x16, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x15,
|
||||
0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x2e, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x21, 0x5a, 0x1f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f,
|
||||
0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67,
|
||||
0x3b, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_log_proto_goTypes = []interface{}{
|
||||
(*common.Index)(nil), // 0: pagerino.common.Index
|
||||
(*common.References)(nil), // 1: pagerino.common.References
|
||||
(*common.Meta)(nil), // 2: pagerino.common.Meta
|
||||
}
|
||||
var file_log_proto_depIdxs = []int32{
|
||||
0, // 0: pagerino.log.LogService.GetChangeIds:input_type -> pagerino.common.Index
|
||||
0, // 1: pagerino.log.LogService.GetMeta:input_type -> pagerino.common.Index
|
||||
1, // 2: pagerino.log.LogService.GetChangeIds:output_type -> pagerino.common.References
|
||||
2, // 3: pagerino.log.LogService.GetMeta:output_type -> pagerino.common.Meta
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_log_proto_init() }
|
||||
func file_log_proto_init() {
|
||||
if File_log_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_log_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_log_proto_goTypes,
|
||||
DependencyIndexes: file_log_proto_depIdxs,
|
||||
}.Build()
|
||||
File_log_proto = out.File
|
||||
file_log_proto_rawDesc = nil
|
||||
file_log_proto_goTypes = nil
|
||||
file_log_proto_depIdxs = nil
|
||||
}
|
||||
144
WebApp/src/main/pager_api/log/log_grpc.pb.go
Normal file
144
WebApp/src/main/pager_api/log/log_grpc.pb.go
Normal file
@@ -0,0 +1,144 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package api_log
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
common "server/app_comm/api/common"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// LogServiceClient is the client API for LogService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type LogServiceClient interface {
|
||||
// === DB information
|
||||
// References
|
||||
GetChangeIds(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.References, error)
|
||||
// Common
|
||||
GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error)
|
||||
}
|
||||
|
||||
type logServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewLogServiceClient(cc grpc.ClientConnInterface) LogServiceClient {
|
||||
return &logServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *logServiceClient) GetChangeIds(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.log.LogService/GetChangeIds", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *logServiceClient) GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error) {
|
||||
out := new(common.Meta)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.log.LogService/GetMeta", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// LogServiceServer is the server API for LogService service.
|
||||
// All implementations must embed UnimplementedLogServiceServer
|
||||
// for forward compatibility
|
||||
type LogServiceServer interface {
|
||||
// === DB information
|
||||
// References
|
||||
GetChangeIds(context.Context, *common.Index) (*common.References, error)
|
||||
// Common
|
||||
GetMeta(context.Context, *common.Index) (*common.Meta, error)
|
||||
mustEmbedUnimplementedLogServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedLogServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedLogServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedLogServiceServer) GetChangeIds(context.Context, *common.Index) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetChangeIds not implemented")
|
||||
}
|
||||
func (UnimplementedLogServiceServer) GetMeta(context.Context, *common.Index) (*common.Meta, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
|
||||
}
|
||||
func (UnimplementedLogServiceServer) mustEmbedUnimplementedLogServiceServer() {}
|
||||
|
||||
// UnsafeLogServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to LogServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeLogServiceServer interface {
|
||||
mustEmbedUnimplementedLogServiceServer()
|
||||
}
|
||||
|
||||
func RegisterLogServiceServer(s grpc.ServiceRegistrar, srv LogServiceServer) {
|
||||
s.RegisterService(&LogService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _LogService_GetChangeIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(LogServiceServer).GetChangeIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.log.LogService/GetChangeIds",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(LogServiceServer).GetChangeIds(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _LogService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(LogServiceServer).GetMeta(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.log.LogService/GetMeta",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(LogServiceServer).GetMeta(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// LogService_ServiceDesc is the grpc.ServiceDesc for LogService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var LogService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pagerino.log.LogService",
|
||||
HandlerType: (*LogServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetChangeIds",
|
||||
Handler: _LogService_GetChangeIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMeta",
|
||||
Handler: _LogService_GetMeta_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "log.proto",
|
||||
}
|
||||
267
WebApp/src/main/pager_api/message/message.pb.go
Normal file
267
WebApp/src/main/pager_api/message/message.pb.go
Normal file
@@ -0,0 +1,267 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: message.proto
|
||||
|
||||
package api_message
|
||||
|
||||
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"
|
||||
common "server/app_comm/api/common"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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 MessageBasicInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SenderId int32 `protobuf:"varint,1,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
|
||||
ReceiverId int32 `protobuf:"varint,2,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
|
||||
Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
}
|
||||
|
||||
func (x *MessageBasicInfo) Reset() {
|
||||
*x = MessageBasicInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_message_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *MessageBasicInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MessageBasicInfo) ProtoMessage() {}
|
||||
|
||||
func (x *MessageBasicInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_message_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MessageBasicInfo.ProtoReflect.Descriptor instead.
|
||||
func (*MessageBasicInfo) Descriptor() ([]byte, []int) {
|
||||
return file_message_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *MessageBasicInfo) GetSenderId() int32 {
|
||||
if x != nil {
|
||||
return x.SenderId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MessageBasicInfo) GetReceiverId() int32 {
|
||||
if x != nil {
|
||||
return x.ReceiverId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MessageBasicInfo) GetPayload() string {
|
||||
if x != nil {
|
||||
return x.Payload
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MessageBasicInfo) GetCreatedAt() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Payload struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Payload) Reset() {
|
||||
*x = Payload{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_message_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Payload) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Payload) ProtoMessage() {}
|
||||
|
||||
func (x *Payload) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_message_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Payload.ProtoReflect.Descriptor instead.
|
||||
func (*Payload) Descriptor() ([]byte, []int) {
|
||||
return file_message_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Payload) GetPayload() string {
|
||||
if x != nil {
|
||||
return x.Payload
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_message_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_message_proto_rawDesc = []byte{
|
||||
0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x10, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 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, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0xa5, 0x01, 0x0a, 0x10, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x69,
|
||||
0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72,
|
||||
0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
|
||||
0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 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, 0x22, 0x23, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c,
|
||||
0x6f, 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x32, 0xd2, 0x01,
|
||||
0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x45, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x1a, 0x22, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x6d,
|
||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61,
|
||||
0x73, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x61,
|
||||
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x19, 0x2e,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d,
|
||||
0x65, 0x74, 0x61, 0x12, 0x16, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x15, 0x2e, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x42, 0x29, 0x5a, 0x27, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70,
|
||||
0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x3b, 0x61, 0x70, 0x69, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_message_proto_rawDescOnce sync.Once
|
||||
file_message_proto_rawDescData = file_message_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_message_proto_rawDescGZIP() []byte {
|
||||
file_message_proto_rawDescOnce.Do(func() {
|
||||
file_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_proto_rawDescData)
|
||||
})
|
||||
return file_message_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_message_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_message_proto_goTypes = []interface{}{
|
||||
(*MessageBasicInfo)(nil), // 0: pagerino.message.MessageBasicInfo
|
||||
(*Payload)(nil), // 1: pagerino.message.Payload
|
||||
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
|
||||
(*common.Index)(nil), // 3: pagerino.common.Index
|
||||
(*common.Meta)(nil), // 4: pagerino.common.Meta
|
||||
}
|
||||
var file_message_proto_depIdxs = []int32{
|
||||
2, // 0: pagerino.message.MessageBasicInfo.created_at:type_name -> google.protobuf.Timestamp
|
||||
3, // 1: pagerino.message.MessageService.GetInfo:input_type -> pagerino.common.Index
|
||||
3, // 2: pagerino.message.MessageService.GetPayload:input_type -> pagerino.common.Index
|
||||
3, // 3: pagerino.message.MessageService.GetMeta:input_type -> pagerino.common.Index
|
||||
0, // 4: pagerino.message.MessageService.GetInfo:output_type -> pagerino.message.MessageBasicInfo
|
||||
1, // 5: pagerino.message.MessageService.GetPayload:output_type -> pagerino.message.Payload
|
||||
4, // 6: pagerino.message.MessageService.GetMeta:output_type -> pagerino.common.Meta
|
||||
4, // [4:7] is the sub-list for method output_type
|
||||
1, // [1:4] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_message_proto_init() }
|
||||
func file_message_proto_init() {
|
||||
if File_message_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MessageBasicInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Payload); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_message_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_message_proto_goTypes,
|
||||
DependencyIndexes: file_message_proto_depIdxs,
|
||||
MessageInfos: file_message_proto_msgTypes,
|
||||
}.Build()
|
||||
File_message_proto = out.File
|
||||
file_message_proto_rawDesc = nil
|
||||
file_message_proto_goTypes = nil
|
||||
file_message_proto_depIdxs = nil
|
||||
}
|
||||
178
WebApp/src/main/pager_api/message/message_grpc.pb.go
Normal file
178
WebApp/src/main/pager_api/message/message_grpc.pb.go
Normal file
@@ -0,0 +1,178 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package api_message
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
common "server/app_comm/api/common"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// MessageServiceClient is the client API for MessageService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type MessageServiceClient interface {
|
||||
// === DB information
|
||||
GetInfo(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*MessageBasicInfo, error)
|
||||
GetPayload(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*Payload, error)
|
||||
// Common
|
||||
GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error)
|
||||
}
|
||||
|
||||
type messageServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMessageServiceClient(cc grpc.ClientConnInterface) MessageServiceClient {
|
||||
return &messageServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *messageServiceClient) GetInfo(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*MessageBasicInfo, error) {
|
||||
out := new(MessageBasicInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.message.MessageService/GetInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *messageServiceClient) GetPayload(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*Payload, error) {
|
||||
out := new(Payload)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.message.MessageService/GetPayload", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *messageServiceClient) GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error) {
|
||||
out := new(common.Meta)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.message.MessageService/GetMeta", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MessageServiceServer is the server API for MessageService service.
|
||||
// All implementations must embed UnimplementedMessageServiceServer
|
||||
// for forward compatibility
|
||||
type MessageServiceServer interface {
|
||||
// === DB information
|
||||
GetInfo(context.Context, *common.Index) (*MessageBasicInfo, error)
|
||||
GetPayload(context.Context, *common.Index) (*Payload, error)
|
||||
// Common
|
||||
GetMeta(context.Context, *common.Index) (*common.Meta, error)
|
||||
mustEmbedUnimplementedMessageServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedMessageServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedMessageServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedMessageServiceServer) GetInfo(context.Context, *common.Index) (*MessageBasicInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
|
||||
}
|
||||
func (UnimplementedMessageServiceServer) GetPayload(context.Context, *common.Index) (*Payload, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPayload not implemented")
|
||||
}
|
||||
func (UnimplementedMessageServiceServer) GetMeta(context.Context, *common.Index) (*common.Meta, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
|
||||
}
|
||||
func (UnimplementedMessageServiceServer) mustEmbedUnimplementedMessageServiceServer() {}
|
||||
|
||||
// UnsafeMessageServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MessageServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMessageServiceServer interface {
|
||||
mustEmbedUnimplementedMessageServiceServer()
|
||||
}
|
||||
|
||||
func RegisterMessageServiceServer(s grpc.ServiceRegistrar, srv MessageServiceServer) {
|
||||
s.RegisterService(&MessageService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _MessageService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MessageServiceServer).GetInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.message.MessageService/GetInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MessageServiceServer).GetInfo(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MessageService_GetPayload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MessageServiceServer).GetPayload(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.message.MessageService/GetPayload",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MessageServiceServer).GetPayload(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MessageService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MessageServiceServer).GetMeta(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.message.MessageService/GetMeta",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MessageServiceServer).GetMeta(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// MessageService_ServiceDesc is the grpc.ServiceDesc for MessageService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var MessageService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pagerino.message.MessageService",
|
||||
HandlerType: (*MessageServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetInfo",
|
||||
Handler: _MessageService_GetInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPayload",
|
||||
Handler: _MessageService_GetPayload_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMeta",
|
||||
Handler: _MessageService_GetMeta_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "message.proto",
|
||||
}
|
||||
168
WebApp/src/main/pager_api/nfccard/nfccard.pb.go
Normal file
168
WebApp/src/main/pager_api/nfccard/nfccard.pb.go
Normal file
@@ -0,0 +1,168 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: nfccard.proto
|
||||
|
||||
package api_nfccard
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
common "server/app_comm/api/common"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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 NfcCardBaseInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NfcCardBaseInfo) Reset() {
|
||||
*x = NfcCardBaseInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_nfccard_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NfcCardBaseInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NfcCardBaseInfo) ProtoMessage() {}
|
||||
|
||||
func (x *NfcCardBaseInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_nfccard_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NfcCardBaseInfo.ProtoReflect.Descriptor instead.
|
||||
func (*NfcCardBaseInfo) Descriptor() ([]byte, []int) {
|
||||
return file_nfccard_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *NfcCardBaseInfo) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_nfccard_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_nfccard_proto_rawDesc = []byte{
|
||||
0x0a, 0x0d, 0x6e, 0x66, 0x63, 0x63, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x11, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x6e, 0x66, 0x63, 0x5f, 0x63, 0x61,
|
||||
0x72, 0x64, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0x23, 0x0a, 0x0f, 0x4e, 0x66, 0x63, 0x43, 0x61, 0x72, 0x64, 0x42, 0x61, 0x73, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x75, 0x69, 0x64, 0x32, 0xd4, 0x01, 0x0a, 0x0e, 0x4e, 0x66, 0x63, 0x43, 0x61, 0x72,
|
||||
0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x22, 0x2e, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x6e, 0x66, 0x63, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x2e,
|
||||
0x4e, 0x66, 0x63, 0x43, 0x61, 0x72, 0x64, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x41, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16,
|
||||
0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
|
||||
0x63, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x16, 0x2e,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x15, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x29, 0x5a, 0x27,
|
||||
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x63, 0x63, 0x61, 0x72, 0x64, 0x3b, 0x61, 0x70, 0x69, 0x5f,
|
||||
0x6e, 0x66, 0x63, 0x63, 0x61, 0x72, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_nfccard_proto_rawDescOnce sync.Once
|
||||
file_nfccard_proto_rawDescData = file_nfccard_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_nfccard_proto_rawDescGZIP() []byte {
|
||||
file_nfccard_proto_rawDescOnce.Do(func() {
|
||||
file_nfccard_proto_rawDescData = protoimpl.X.CompressGZIP(file_nfccard_proto_rawDescData)
|
||||
})
|
||||
return file_nfccard_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_nfccard_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_nfccard_proto_goTypes = []interface{}{
|
||||
(*NfcCardBaseInfo)(nil), // 0: pagerino.nfc_card.NfcCardBaseInfo
|
||||
(*common.Index)(nil), // 1: pagerino.common.Index
|
||||
(*common.Reference)(nil), // 2: pagerino.common.Reference
|
||||
(*common.Meta)(nil), // 3: pagerino.common.Meta
|
||||
}
|
||||
var file_nfccard_proto_depIdxs = []int32{
|
||||
1, // 0: pagerino.nfc_card.NfcCardService.GetInfo:input_type -> pagerino.common.Index
|
||||
1, // 1: pagerino.nfc_card.NfcCardService.GetDeviceId:input_type -> pagerino.common.Index
|
||||
1, // 2: pagerino.nfc_card.NfcCardService.GetMeta:input_type -> pagerino.common.Index
|
||||
0, // 3: pagerino.nfc_card.NfcCardService.GetInfo:output_type -> pagerino.nfc_card.NfcCardBaseInfo
|
||||
2, // 4: pagerino.nfc_card.NfcCardService.GetDeviceId:output_type -> pagerino.common.Reference
|
||||
3, // 5: pagerino.nfc_card.NfcCardService.GetMeta:output_type -> pagerino.common.Meta
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_nfccard_proto_init() }
|
||||
func file_nfccard_proto_init() {
|
||||
if File_nfccard_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_nfccard_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NfcCardBaseInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_nfccard_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_nfccard_proto_goTypes,
|
||||
DependencyIndexes: file_nfccard_proto_depIdxs,
|
||||
MessageInfos: file_nfccard_proto_msgTypes,
|
||||
}.Build()
|
||||
File_nfccard_proto = out.File
|
||||
file_nfccard_proto_rawDesc = nil
|
||||
file_nfccard_proto_goTypes = nil
|
||||
file_nfccard_proto_depIdxs = nil
|
||||
}
|
||||
180
WebApp/src/main/pager_api/nfccard/nfccard_grpc.pb.go
Normal file
180
WebApp/src/main/pager_api/nfccard/nfccard_grpc.pb.go
Normal file
@@ -0,0 +1,180 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package api_nfccard
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
common "server/app_comm/api/common"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// NfcCardServiceClient is the client API for NfcCardService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type NfcCardServiceClient interface {
|
||||
// === DB information
|
||||
GetInfo(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*NfcCardBaseInfo, error)
|
||||
// References
|
||||
GetDeviceId(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Reference, error)
|
||||
// Common
|
||||
GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error)
|
||||
}
|
||||
|
||||
type nfcCardServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewNfcCardServiceClient(cc grpc.ClientConnInterface) NfcCardServiceClient {
|
||||
return &nfcCardServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *nfcCardServiceClient) GetInfo(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*NfcCardBaseInfo, error) {
|
||||
out := new(NfcCardBaseInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.nfc_card.NfcCardService/GetInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nfcCardServiceClient) GetDeviceId(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Reference, error) {
|
||||
out := new(common.Reference)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.nfc_card.NfcCardService/GetDeviceId", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nfcCardServiceClient) GetMeta(ctx context.Context, in *common.Index, opts ...grpc.CallOption) (*common.Meta, error) {
|
||||
out := new(common.Meta)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.nfc_card.NfcCardService/GetMeta", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NfcCardServiceServer is the server API for NfcCardService service.
|
||||
// All implementations must embed UnimplementedNfcCardServiceServer
|
||||
// for forward compatibility
|
||||
type NfcCardServiceServer interface {
|
||||
// === DB information
|
||||
GetInfo(context.Context, *common.Index) (*NfcCardBaseInfo, error)
|
||||
// References
|
||||
GetDeviceId(context.Context, *common.Index) (*common.Reference, error)
|
||||
// Common
|
||||
GetMeta(context.Context, *common.Index) (*common.Meta, error)
|
||||
mustEmbedUnimplementedNfcCardServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedNfcCardServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedNfcCardServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedNfcCardServiceServer) GetInfo(context.Context, *common.Index) (*NfcCardBaseInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
|
||||
}
|
||||
func (UnimplementedNfcCardServiceServer) GetDeviceId(context.Context, *common.Index) (*common.Reference, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetDeviceId not implemented")
|
||||
}
|
||||
func (UnimplementedNfcCardServiceServer) GetMeta(context.Context, *common.Index) (*common.Meta, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
|
||||
}
|
||||
func (UnimplementedNfcCardServiceServer) mustEmbedUnimplementedNfcCardServiceServer() {}
|
||||
|
||||
// UnsafeNfcCardServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to NfcCardServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeNfcCardServiceServer interface {
|
||||
mustEmbedUnimplementedNfcCardServiceServer()
|
||||
}
|
||||
|
||||
func RegisterNfcCardServiceServer(s grpc.ServiceRegistrar, srv NfcCardServiceServer) {
|
||||
s.RegisterService(&NfcCardService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _NfcCardService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NfcCardServiceServer).GetInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.nfc_card.NfcCardService/GetInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NfcCardServiceServer).GetInfo(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NfcCardService_GetDeviceId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NfcCardServiceServer).GetDeviceId(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.nfc_card.NfcCardService/GetDeviceId",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NfcCardServiceServer).GetDeviceId(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NfcCardService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.Index)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NfcCardServiceServer).GetMeta(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.nfc_card.NfcCardService/GetMeta",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NfcCardServiceServer).GetMeta(ctx, req.(*common.Index))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// NfcCardService_ServiceDesc is the grpc.ServiceDesc for NfcCardService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var NfcCardService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pagerino.nfc_card.NfcCardService",
|
||||
HandlerType: (*NfcCardServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetInfo",
|
||||
Handler: _NfcCardService_GetInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDeviceId",
|
||||
Handler: _NfcCardService_GetDeviceId_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMeta",
|
||||
Handler: _NfcCardService_GetMeta_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "nfccard.proto",
|
||||
}
|
||||
181
WebApp/src/main/pager_api/permission/permission.pb.go
Normal file
181
WebApp/src/main/pager_api/permission/permission.pb.go
Normal file
@@ -0,0 +1,181 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: permission.proto
|
||||
|
||||
package api_permission
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
common "server/app_comm/api/common"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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 PermissionBasicInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PermissionBasicInfo) Reset() {
|
||||
*x = PermissionBasicInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_permission_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PermissionBasicInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PermissionBasicInfo) ProtoMessage() {}
|
||||
|
||||
func (x *PermissionBasicInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_permission_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PermissionBasicInfo.ProtoReflect.Descriptor instead.
|
||||
func (*PermissionBasicInfo) Descriptor() ([]byte, []int) {
|
||||
return file_permission_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *PermissionBasicInfo) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PermissionBasicInfo) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_permission_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_permission_proto_rawDesc = []byte{
|
||||
0x0a, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x13, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x13, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 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,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x32, 0xe6, 0x01, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x28,
|
||||
0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42,
|
||||
0x61, 0x73, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52,
|
||||
0x6f, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x3b,
|
||||
0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65,
|
||||
0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x1a, 0x15, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x2f, 0x5a, 0x2d, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x3b, 0x61, 0x70,
|
||||
0x69, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_permission_proto_rawDescOnce sync.Once
|
||||
file_permission_proto_rawDescData = file_permission_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_permission_proto_rawDescGZIP() []byte {
|
||||
file_permission_proto_rawDescOnce.Do(func() {
|
||||
file_permission_proto_rawDescData = protoimpl.X.CompressGZIP(file_permission_proto_rawDescData)
|
||||
})
|
||||
return file_permission_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_permission_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_permission_proto_goTypes = []interface{}{
|
||||
(*PermissionBasicInfo)(nil), // 0: pagerino.permission.PermissionBasicInfo
|
||||
(*common.StrIndex)(nil), // 1: pagerino.common.StrIndex
|
||||
(*common.References)(nil), // 2: pagerino.common.References
|
||||
(*common.Meta)(nil), // 3: pagerino.common.Meta
|
||||
}
|
||||
var file_permission_proto_depIdxs = []int32{
|
||||
1, // 0: pagerino.permission.PermissionService.GetInfo:input_type -> pagerino.common.StrIndex
|
||||
1, // 1: pagerino.permission.PermissionService.GetRoleIds:input_type -> pagerino.common.StrIndex
|
||||
1, // 2: pagerino.permission.PermissionService.GetMeta:input_type -> pagerino.common.StrIndex
|
||||
0, // 3: pagerino.permission.PermissionService.GetInfo:output_type -> pagerino.permission.PermissionBasicInfo
|
||||
2, // 4: pagerino.permission.PermissionService.GetRoleIds:output_type -> pagerino.common.References
|
||||
3, // 5: pagerino.permission.PermissionService.GetMeta:output_type -> pagerino.common.Meta
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_permission_proto_init() }
|
||||
func file_permission_proto_init() {
|
||||
if File_permission_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_permission_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PermissionBasicInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_permission_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_permission_proto_goTypes,
|
||||
DependencyIndexes: file_permission_proto_depIdxs,
|
||||
MessageInfos: file_permission_proto_msgTypes,
|
||||
}.Build()
|
||||
File_permission_proto = out.File
|
||||
file_permission_proto_rawDesc = nil
|
||||
file_permission_proto_goTypes = nil
|
||||
file_permission_proto_depIdxs = nil
|
||||
}
|
||||
180
WebApp/src/main/pager_api/permission/permission_grpc.pb.go
Normal file
180
WebApp/src/main/pager_api/permission/permission_grpc.pb.go
Normal file
@@ -0,0 +1,180 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package api_permission
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
common "server/app_comm/api/common"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// PermissionServiceClient is the client API for PermissionService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type PermissionServiceClient interface {
|
||||
// === DB information
|
||||
GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*PermissionBasicInfo, error)
|
||||
// References
|
||||
GetRoleIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
// Common
|
||||
GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error)
|
||||
}
|
||||
|
||||
type permissionServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPermissionServiceClient(cc grpc.ClientConnInterface) PermissionServiceClient {
|
||||
return &permissionServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *permissionServiceClient) GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*PermissionBasicInfo, error) {
|
||||
out := new(PermissionBasicInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.permission.PermissionService/GetInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *permissionServiceClient) GetRoleIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.permission.PermissionService/GetRoleIds", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *permissionServiceClient) GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error) {
|
||||
out := new(common.Meta)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.permission.PermissionService/GetMeta", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PermissionServiceServer is the server API for PermissionService service.
|
||||
// All implementations must embed UnimplementedPermissionServiceServer
|
||||
// for forward compatibility
|
||||
type PermissionServiceServer interface {
|
||||
// === DB information
|
||||
GetInfo(context.Context, *common.StrIndex) (*PermissionBasicInfo, error)
|
||||
// References
|
||||
GetRoleIds(context.Context, *common.StrIndex) (*common.References, error)
|
||||
// Common
|
||||
GetMeta(context.Context, *common.StrIndex) (*common.Meta, error)
|
||||
mustEmbedUnimplementedPermissionServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedPermissionServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedPermissionServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedPermissionServiceServer) GetInfo(context.Context, *common.StrIndex) (*PermissionBasicInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
|
||||
}
|
||||
func (UnimplementedPermissionServiceServer) GetRoleIds(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetRoleIds not implemented")
|
||||
}
|
||||
func (UnimplementedPermissionServiceServer) GetMeta(context.Context, *common.StrIndex) (*common.Meta, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
|
||||
}
|
||||
func (UnimplementedPermissionServiceServer) mustEmbedUnimplementedPermissionServiceServer() {}
|
||||
|
||||
// UnsafePermissionServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PermissionServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePermissionServiceServer interface {
|
||||
mustEmbedUnimplementedPermissionServiceServer()
|
||||
}
|
||||
|
||||
func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer) {
|
||||
s.RegisterService(&PermissionService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PermissionService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PermissionServiceServer).GetInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.permission.PermissionService/GetInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PermissionServiceServer).GetInfo(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PermissionService_GetRoleIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PermissionServiceServer).GetRoleIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.permission.PermissionService/GetRoleIds",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PermissionServiceServer).GetRoleIds(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PermissionService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PermissionServiceServer).GetMeta(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.permission.PermissionService/GetMeta",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PermissionServiceServer).GetMeta(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PermissionService_ServiceDesc is the grpc.ServiceDesc for PermissionService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PermissionService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pagerino.permission.PermissionService",
|
||||
HandlerType: (*PermissionServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetInfo",
|
||||
Handler: _PermissionService_GetInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetRoleIds",
|
||||
Handler: _PermissionService_GetRoleIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMeta",
|
||||
Handler: _PermissionService_GetMeta_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "permission.proto",
|
||||
}
|
||||
184
WebApp/src/main/pager_api/role/role.pb.go
Normal file
184
WebApp/src/main/pager_api/role/role.pb.go
Normal file
@@ -0,0 +1,184 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: role.proto
|
||||
|
||||
package api_role
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
common "server/app_comm/api/common"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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 RoleBasicInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RoleBasicInfo) Reset() {
|
||||
*x = RoleBasicInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_role_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RoleBasicInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RoleBasicInfo) ProtoMessage() {}
|
||||
|
||||
func (x *RoleBasicInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_role_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RoleBasicInfo.ProtoReflect.Descriptor instead.
|
||||
func (*RoleBasicInfo) Descriptor() ([]byte, []int) {
|
||||
return file_role_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *RoleBasicInfo) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RoleBasicInfo) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_role_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_role_proto_rawDesc = []byte{
|
||||
0x0a, 0x0a, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x72, 0x6f, 0x6c, 0x65, 0x1a, 0x0c, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x0d, 0x52, 0x6f, 0x6c,
|
||||
0x65, 0x42, 0x61, 0x73, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x01, 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, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x32, 0xa0, 0x02, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74,
|
||||
0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x69, 0x63,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72,
|
||||
0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73,
|
||||
0x12, 0x44, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x19,
|
||||
0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65,
|
||||
0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65,
|
||||
0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74,
|
||||
0x61, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x15, 0x2e, 0x70,
|
||||
0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d,
|
||||
0x65, 0x74, 0x61, 0x42, 0x23, 0x5a, 0x21, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70,
|
||||
0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x3b,
|
||||
0x61, 0x70, 0x69, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_role_proto_rawDescOnce sync.Once
|
||||
file_role_proto_rawDescData = file_role_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_role_proto_rawDescGZIP() []byte {
|
||||
file_role_proto_rawDescOnce.Do(func() {
|
||||
file_role_proto_rawDescData = protoimpl.X.CompressGZIP(file_role_proto_rawDescData)
|
||||
})
|
||||
return file_role_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_role_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_role_proto_goTypes = []interface{}{
|
||||
(*RoleBasicInfo)(nil), // 0: pagerino.role.RoleBasicInfo
|
||||
(*common.StrIndex)(nil), // 1: pagerino.common.StrIndex
|
||||
(*common.References)(nil), // 2: pagerino.common.References
|
||||
(*common.Meta)(nil), // 3: pagerino.common.Meta
|
||||
}
|
||||
var file_role_proto_depIdxs = []int32{
|
||||
1, // 0: pagerino.role.RoleService.GetInfo:input_type -> pagerino.common.StrIndex
|
||||
1, // 1: pagerino.role.RoleService.GetPermissionIds:input_type -> pagerino.common.StrIndex
|
||||
1, // 2: pagerino.role.RoleService.GetUserIds:input_type -> pagerino.common.StrIndex
|
||||
1, // 3: pagerino.role.RoleService.GetMeta:input_type -> pagerino.common.StrIndex
|
||||
0, // 4: pagerino.role.RoleService.GetInfo:output_type -> pagerino.role.RoleBasicInfo
|
||||
2, // 5: pagerino.role.RoleService.GetPermissionIds:output_type -> pagerino.common.References
|
||||
2, // 6: pagerino.role.RoleService.GetUserIds:output_type -> pagerino.common.References
|
||||
3, // 7: pagerino.role.RoleService.GetMeta:output_type -> pagerino.common.Meta
|
||||
4, // [4:8] is the sub-list for method output_type
|
||||
0, // [0:4] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_role_proto_init() }
|
||||
func file_role_proto_init() {
|
||||
if File_role_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_role_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RoleBasicInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_role_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_role_proto_goTypes,
|
||||
DependencyIndexes: file_role_proto_depIdxs,
|
||||
MessageInfos: file_role_proto_msgTypes,
|
||||
}.Build()
|
||||
File_role_proto = out.File
|
||||
file_role_proto_rawDesc = nil
|
||||
file_role_proto_goTypes = nil
|
||||
file_role_proto_depIdxs = nil
|
||||
}
|
||||
216
WebApp/src/main/pager_api/role/role_grpc.pb.go
Normal file
216
WebApp/src/main/pager_api/role/role_grpc.pb.go
Normal file
@@ -0,0 +1,216 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package api_role
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
common "server/app_comm/api/common"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// RoleServiceClient is the client API for RoleService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type RoleServiceClient interface {
|
||||
// === DB information
|
||||
GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*RoleBasicInfo, error)
|
||||
// References
|
||||
GetPermissionIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
GetUserIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
// Common
|
||||
GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error)
|
||||
}
|
||||
|
||||
type roleServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRoleServiceClient(cc grpc.ClientConnInterface) RoleServiceClient {
|
||||
return &roleServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*RoleBasicInfo, error) {
|
||||
out := new(RoleBasicInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.role.RoleService/GetInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) GetPermissionIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.role.RoleService/GetPermissionIds", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) GetUserIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.role.RoleService/GetUserIds", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *roleServiceClient) GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error) {
|
||||
out := new(common.Meta)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.role.RoleService/GetMeta", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RoleServiceServer is the server API for RoleService service.
|
||||
// All implementations must embed UnimplementedRoleServiceServer
|
||||
// for forward compatibility
|
||||
type RoleServiceServer interface {
|
||||
// === DB information
|
||||
GetInfo(context.Context, *common.StrIndex) (*RoleBasicInfo, error)
|
||||
// References
|
||||
GetPermissionIds(context.Context, *common.StrIndex) (*common.References, error)
|
||||
GetUserIds(context.Context, *common.StrIndex) (*common.References, error)
|
||||
// Common
|
||||
GetMeta(context.Context, *common.StrIndex) (*common.Meta, error)
|
||||
mustEmbedUnimplementedRoleServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedRoleServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRoleServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRoleServiceServer) GetInfo(context.Context, *common.StrIndex) (*RoleBasicInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
|
||||
}
|
||||
func (UnimplementedRoleServiceServer) GetPermissionIds(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPermissionIds not implemented")
|
||||
}
|
||||
func (UnimplementedRoleServiceServer) GetUserIds(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUserIds not implemented")
|
||||
}
|
||||
func (UnimplementedRoleServiceServer) GetMeta(context.Context, *common.StrIndex) (*common.Meta, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
|
||||
}
|
||||
func (UnimplementedRoleServiceServer) mustEmbedUnimplementedRoleServiceServer() {}
|
||||
|
||||
// UnsafeRoleServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RoleServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRoleServiceServer interface {
|
||||
mustEmbedUnimplementedRoleServiceServer()
|
||||
}
|
||||
|
||||
func RegisterRoleServiceServer(s grpc.ServiceRegistrar, srv RoleServiceServer) {
|
||||
s.RegisterService(&RoleService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _RoleService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).GetInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.role.RoleService/GetInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).GetInfo(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_GetPermissionIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).GetPermissionIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.role.RoleService/GetPermissionIds",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).GetPermissionIds(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_GetUserIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).GetUserIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.role.RoleService/GetUserIds",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).GetUserIds(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RoleService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RoleServiceServer).GetMeta(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.role.RoleService/GetMeta",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RoleServiceServer).GetMeta(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// RoleService_ServiceDesc is the grpc.ServiceDesc for RoleService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var RoleService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pagerino.role.RoleService",
|
||||
HandlerType: (*RoleServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetInfo",
|
||||
Handler: _RoleService_GetInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPermissionIds",
|
||||
Handler: _RoleService_GetPermissionIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUserIds",
|
||||
Handler: _RoleService_GetUserIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMeta",
|
||||
Handler: _RoleService_GetMeta_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "role.proto",
|
||||
}
|
||||
182
WebApp/src/main/pager_api/status/status.pb.go
Normal file
182
WebApp/src/main/pager_api/status/status.pb.go
Normal file
@@ -0,0 +1,182 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: status.proto
|
||||
|
||||
package api_status
|
||||
|
||||
import (
|
||||
common "pagerino-web/pager_api/common"
|
||||
reflect "reflect"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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 StatusBasicInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
InternalStatus int32 `protobuf:"zigzag32,1,opt,name=internal_status,json=internalStatus,proto3" json:"internal_status,omitempty"`
|
||||
NativeStatus string `protobuf:"bytes,2,opt,name=native_status,json=nativeStatus,proto3" json:"native_status,omitempty"`
|
||||
}
|
||||
|
||||
func (x *StatusBasicInfo) Reset() {
|
||||
*x = StatusBasicInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_status_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StatusBasicInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*StatusBasicInfo) ProtoMessage() {}
|
||||
|
||||
func (x *StatusBasicInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_status_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StatusBasicInfo.ProtoReflect.Descriptor instead.
|
||||
func (*StatusBasicInfo) Descriptor() ([]byte, []int) {
|
||||
return file_status_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *StatusBasicInfo) GetInternalStatus() int32 {
|
||||
if x != nil {
|
||||
return x.InternalStatus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *StatusBasicInfo) GetNativeStatus() string {
|
||||
if x != nil {
|
||||
return x.NativeStatus
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_status_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_status_proto_rawDesc = []byte{
|
||||
0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a,
|
||||
0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a,
|
||||
0x0f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x61, 0x73, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72,
|
||||
0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x61, 0x74,
|
||||
0x69, 0x76, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0c, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0xda,
|
||||
0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x46, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74,
|
||||
0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42,
|
||||
0x61, 0x73, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69,
|
||||
0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3b,
|
||||
0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65,
|
||||
0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x1a, 0x15, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x27, 0x5a, 0x25, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3b, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_status_proto_rawDescOnce sync.Once
|
||||
file_status_proto_rawDescData = file_status_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_status_proto_rawDescGZIP() []byte {
|
||||
file_status_proto_rawDescOnce.Do(func() {
|
||||
file_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_status_proto_rawDescData)
|
||||
})
|
||||
return file_status_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_status_proto_goTypes = []interface{}{
|
||||
(*StatusBasicInfo)(nil), // 0: pagerino.status.StatusBasicInfo
|
||||
(*common.StrIndex)(nil), // 1: pagerino.common.StrIndex
|
||||
(*common.Reference)(nil), // 2: pagerino.common.Reference
|
||||
(*common.Meta)(nil), // 3: pagerino.common.Meta
|
||||
}
|
||||
var file_status_proto_depIdxs = []int32{
|
||||
1, // 0: pagerino.status.StatusService.GetInfo:input_type -> pagerino.common.StrIndex
|
||||
1, // 1: pagerino.status.StatusService.GetDeviceId:input_type -> pagerino.common.StrIndex
|
||||
1, // 2: pagerino.status.StatusService.GetMeta:input_type -> pagerino.common.StrIndex
|
||||
0, // 3: pagerino.status.StatusService.GetInfo:output_type -> pagerino.status.StatusBasicInfo
|
||||
2, // 4: pagerino.status.StatusService.GetDeviceId:output_type -> pagerino.common.Reference
|
||||
3, // 5: pagerino.status.StatusService.GetMeta:output_type -> pagerino.common.Meta
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_status_proto_init() }
|
||||
func file_status_proto_init() {
|
||||
if File_status_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StatusBasicInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_status_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_status_proto_goTypes,
|
||||
DependencyIndexes: file_status_proto_depIdxs,
|
||||
MessageInfos: file_status_proto_msgTypes,
|
||||
}.Build()
|
||||
File_status_proto = out.File
|
||||
file_status_proto_rawDesc = nil
|
||||
file_status_proto_goTypes = nil
|
||||
file_status_proto_depIdxs = nil
|
||||
}
|
||||
181
WebApp/src/main/pager_api/status/status_grpc.pb.go
Normal file
181
WebApp/src/main/pager_api/status/status_grpc.pb.go
Normal file
@@ -0,0 +1,181 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package api_status
|
||||
|
||||
import (
|
||||
context "context"
|
||||
common "pagerino-web/pager_api/common"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// StatusServiceClient is the client API for StatusService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type StatusServiceClient interface {
|
||||
// === DB information
|
||||
GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*StatusBasicInfo, error)
|
||||
// References
|
||||
GetDeviceId(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Reference, error)
|
||||
// Common
|
||||
GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error)
|
||||
}
|
||||
|
||||
type statusServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewStatusServiceClient(cc grpc.ClientConnInterface) StatusServiceClient {
|
||||
return &statusServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *statusServiceClient) GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*StatusBasicInfo, error) {
|
||||
out := new(StatusBasicInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.status.StatusService/GetInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *statusServiceClient) GetDeviceId(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Reference, error) {
|
||||
out := new(common.Reference)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.status.StatusService/GetDeviceId", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *statusServiceClient) GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error) {
|
||||
out := new(common.Meta)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.status.StatusService/GetMeta", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// StatusServiceServer is the server API for StatusService service.
|
||||
// All implementations must embed UnimplementedStatusServiceServer
|
||||
// for forward compatibility
|
||||
type StatusServiceServer interface {
|
||||
// === DB information
|
||||
GetInfo(context.Context, *common.StrIndex) (*StatusBasicInfo, error)
|
||||
// References
|
||||
GetDeviceId(context.Context, *common.StrIndex) (*common.Reference, error)
|
||||
// Common
|
||||
GetMeta(context.Context, *common.StrIndex) (*common.Meta, error)
|
||||
mustEmbedUnimplementedStatusServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedStatusServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedStatusServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedStatusServiceServer) GetInfo(context.Context, *common.StrIndex) (*StatusBasicInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
|
||||
}
|
||||
func (UnimplementedStatusServiceServer) GetDeviceId(context.Context, *common.StrIndex) (*common.Reference, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetDeviceId not implemented")
|
||||
}
|
||||
func (UnimplementedStatusServiceServer) GetMeta(context.Context, *common.StrIndex) (*common.Meta, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
|
||||
}
|
||||
func (UnimplementedStatusServiceServer) mustEmbedUnimplementedStatusServiceServer() {}
|
||||
|
||||
// UnsafeStatusServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to StatusServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeStatusServiceServer interface {
|
||||
mustEmbedUnimplementedStatusServiceServer()
|
||||
}
|
||||
|
||||
func RegisterStatusServiceServer(s grpc.ServiceRegistrar, srv StatusServiceServer) {
|
||||
s.RegisterService(&StatusService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _StatusService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(StatusServiceServer).GetInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.status.StatusService/GetInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StatusServiceServer).GetInfo(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _StatusService_GetDeviceId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(StatusServiceServer).GetDeviceId(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.status.StatusService/GetDeviceId",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StatusServiceServer).GetDeviceId(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _StatusService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(StatusServiceServer).GetMeta(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.status.StatusService/GetMeta",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(StatusServiceServer).GetMeta(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// StatusService_ServiceDesc is the grpc.ServiceDesc for StatusService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var StatusService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pagerino.status.StatusService",
|
||||
HandlerType: (*StatusServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetInfo",
|
||||
Handler: _StatusService_GetInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDeviceId",
|
||||
Handler: _StatusService_GetDeviceId_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMeta",
|
||||
Handler: _StatusService_GetMeta_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "status.proto",
|
||||
}
|
||||
386
WebApp/src/main/pager_api/user/user.pb.go
Normal file
386
WebApp/src/main/pager_api/user/user.pb.go
Normal file
@@ -0,0 +1,386 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// source: user.proto
|
||||
|
||||
package api_user
|
||||
|
||||
import (
|
||||
common "pagerino-web/pager_api/common"
|
||||
reflect "reflect"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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 Password struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Password) Reset() {
|
||||
*x = Password{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_user_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Password) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Password) ProtoMessage() {}
|
||||
|
||||
func (x *Password) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Password.ProtoReflect.Descriptor instead.
|
||||
func (*Password) Descriptor() ([]byte, []int) {
|
||||
return file_user_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Password) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UserAllInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
||||
RoleId int32 `protobuf:"varint,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
|
||||
LastOnline *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_online,json=lastOnline,proto3" json:"last_online,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UserAllInfo) Reset() {
|
||||
*x = UserAllInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_user_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserAllInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserAllInfo) ProtoMessage() {}
|
||||
|
||||
func (x *UserAllInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserAllInfo.ProtoReflect.Descriptor instead.
|
||||
func (*UserAllInfo) Descriptor() ([]byte, []int) {
|
||||
return file_user_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *UserAllInfo) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserAllInfo) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserAllInfo) GetRoleId() int32 {
|
||||
if x != nil {
|
||||
return x.RoleId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAllInfo) GetLastOnline() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.LastOnline
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UserBaseInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
RoleId int32 `protobuf:"varint,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`
|
||||
LastOnline *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_online,json=lastOnline,proto3" json:"last_online,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UserBaseInfo) Reset() {
|
||||
*x = UserBaseInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_user_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserBaseInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserBaseInfo) ProtoMessage() {}
|
||||
|
||||
func (x *UserBaseInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_user_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserBaseInfo.ProtoReflect.Descriptor instead.
|
||||
func (*UserBaseInfo) Descriptor() ([]byte, []int) {
|
||||
return file_user_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *UserBaseInfo) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserBaseInfo) GetRoleId() int32 {
|
||||
if x != nil {
|
||||
return x.RoleId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserBaseInfo) GetLastOnline() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.LastOnline
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_user_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_user_proto_rawDesc = []byte{
|
||||
0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x75, 0x73, 0x65, 0x72, 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, 0x1a, 0x0c, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x26, 0x0a, 0x08, 0x50, 0x61,
|
||||
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||
0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||
0x72, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x41, 0x6c, 0x6c, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||
0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
|
||||
0x72, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x6c,
|
||||
0x61, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 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, 0x0a, 0x6c, 0x61,
|
||||
0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x78, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72,
|
||||
0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07,
|
||||
0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72,
|
||||
0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x6e,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 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, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x69,
|
||||
0x6e, 0x65, 0x32, 0xa5, 0x04, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x70,
|
||||
0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53,
|
||||
0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69,
|
||||
0x6e, 0x6f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x6c, 0x6c, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x41, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19,
|
||||
0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65,
|
||||
0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61,
|
||||
0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x41, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x61, 0x73,
|
||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x1a, 0x17, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x75, 0x73, 0x65, 0x72,
|
||||
0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x42, 0x0a, 0x09, 0x47, 0x65, 0x74,
|
||||
0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e,
|
||||
0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x46, 0x0a,
|
||||
0x0c, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x19, 0x2e,
|
||||
0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
|
||||
0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72,
|
||||
0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72,
|
||||
0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73,
|
||||
0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, 0x1b, 0x2e, 0x70, 0x61,
|
||||
0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65,
|
||||
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41,
|
||||
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69,
|
||||
0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x1a, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a,
|
||||
0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72,
|
||||
0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x72, 0x49, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x1a, 0x15, 0x2e, 0x70, 0x61, 0x67, 0x65, 0x72, 0x69, 0x6e, 0x6f, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x23, 0x5a, 0x21, 0x73, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x3b, 0x61, 0x70, 0x69, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_user_proto_rawDescOnce sync.Once
|
||||
file_user_proto_rawDescData = file_user_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_user_proto_rawDescGZIP() []byte {
|
||||
file_user_proto_rawDescOnce.Do(func() {
|
||||
file_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_proto_rawDescData)
|
||||
})
|
||||
return file_user_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_user_proto_goTypes = []interface{}{
|
||||
(*Password)(nil), // 0: pagerino.user.Password
|
||||
(*UserAllInfo)(nil), // 1: pagerino.user.UserAllInfo
|
||||
(*UserBaseInfo)(nil), // 2: pagerino.user.UserBaseInfo
|
||||
(*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
|
||||
(*common.StrIndex)(nil), // 4: pagerino.common.StrIndex
|
||||
(*common.Reference)(nil), // 5: pagerino.common.Reference
|
||||
(*common.References)(nil), // 6: pagerino.common.References
|
||||
(*common.Activity)(nil), // 7: pagerino.common.Activity
|
||||
(*common.Meta)(nil), // 8: pagerino.common.Meta
|
||||
}
|
||||
var file_user_proto_depIdxs = []int32{
|
||||
3, // 0: pagerino.user.UserAllInfo.last_online:type_name -> google.protobuf.Timestamp
|
||||
3, // 1: pagerino.user.UserBaseInfo.last_online:type_name -> google.protobuf.Timestamp
|
||||
4, // 2: pagerino.user.UserService.GetAll:input_type -> pagerino.common.StrIndex
|
||||
4, // 3: pagerino.user.UserService.GetInfo:input_type -> pagerino.common.StrIndex
|
||||
4, // 4: pagerino.user.UserService.GetPassword:input_type -> pagerino.common.StrIndex
|
||||
4, // 5: pagerino.user.UserService.GetRoleId:input_type -> pagerino.common.StrIndex
|
||||
4, // 6: pagerino.user.UserService.GetDeviceIds:input_type -> pagerino.common.StrIndex
|
||||
4, // 7: pagerino.user.UserService.GetLogs:input_type -> pagerino.common.StrIndex
|
||||
4, // 8: pagerino.user.UserService.GetActivity:input_type -> pagerino.common.StrIndex
|
||||
4, // 9: pagerino.user.UserService.GetMeta:input_type -> pagerino.common.StrIndex
|
||||
1, // 10: pagerino.user.UserService.GetAll:output_type -> pagerino.user.UserAllInfo
|
||||
2, // 11: pagerino.user.UserService.GetInfo:output_type -> pagerino.user.UserBaseInfo
|
||||
0, // 12: pagerino.user.UserService.GetPassword:output_type -> pagerino.user.Password
|
||||
5, // 13: pagerino.user.UserService.GetRoleId:output_type -> pagerino.common.Reference
|
||||
6, // 14: pagerino.user.UserService.GetDeviceIds:output_type -> pagerino.common.References
|
||||
6, // 15: pagerino.user.UserService.GetLogs:output_type -> pagerino.common.References
|
||||
7, // 16: pagerino.user.UserService.GetActivity:output_type -> pagerino.common.Activity
|
||||
8, // 17: pagerino.user.UserService.GetMeta:output_type -> pagerino.common.Meta
|
||||
10, // [10:18] is the sub-list for method output_type
|
||||
2, // [2:10] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_user_proto_init() }
|
||||
func file_user_proto_init() {
|
||||
if File_user_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Password); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserAllInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserBaseInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_user_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_user_proto_goTypes,
|
||||
DependencyIndexes: file_user_proto_depIdxs,
|
||||
MessageInfos: file_user_proto_msgTypes,
|
||||
}.Build()
|
||||
File_user_proto = out.File
|
||||
file_user_proto_rawDesc = nil
|
||||
file_user_proto_goTypes = nil
|
||||
file_user_proto_depIdxs = nil
|
||||
}
|
||||
361
WebApp/src/main/pager_api/user/user_grpc.pb.go
Normal file
361
WebApp/src/main/pager_api/user/user_grpc.pb.go
Normal file
@@ -0,0 +1,361 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package api_user
|
||||
|
||||
import (
|
||||
context "context"
|
||||
common "pagerino-web/pager_api/common"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// UserServiceClient is the client API for UserService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type UserServiceClient interface {
|
||||
// === DB information
|
||||
GetAll(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*UserAllInfo, error)
|
||||
GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*UserBaseInfo, error)
|
||||
GetPassword(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Password, error)
|
||||
// References
|
||||
GetRoleId(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Reference, error)
|
||||
GetDeviceIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
GetLogs(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error)
|
||||
// Common
|
||||
GetActivity(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Activity, error)
|
||||
GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error)
|
||||
}
|
||||
|
||||
type userServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
|
||||
return &userServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetAll(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*UserAllInfo, error) {
|
||||
out := new(UserAllInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.user.UserService/GetAll", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetInfo(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*UserBaseInfo, error) {
|
||||
out := new(UserBaseInfo)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.user.UserService/GetInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetPassword(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*Password, error) {
|
||||
out := new(Password)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.user.UserService/GetPassword", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetRoleId(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Reference, error) {
|
||||
out := new(common.Reference)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.user.UserService/GetRoleId", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetDeviceIds(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.user.UserService/GetDeviceIds", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetLogs(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.References, error) {
|
||||
out := new(common.References)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.user.UserService/GetLogs", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetActivity(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Activity, error) {
|
||||
out := new(common.Activity)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.user.UserService/GetActivity", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userServiceClient) GetMeta(ctx context.Context, in *common.StrIndex, opts ...grpc.CallOption) (*common.Meta, error) {
|
||||
out := new(common.Meta)
|
||||
err := c.cc.Invoke(ctx, "/pagerino.user.UserService/GetMeta", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UserServiceServer is the server API for UserService service.
|
||||
// All implementations must embed UnimplementedUserServiceServer
|
||||
// for forward compatibility
|
||||
type UserServiceServer interface {
|
||||
// === DB information
|
||||
GetAll(context.Context, *common.StrIndex) (*UserAllInfo, error)
|
||||
GetInfo(context.Context, *common.StrIndex) (*UserBaseInfo, error)
|
||||
GetPassword(context.Context, *common.StrIndex) (*Password, error)
|
||||
// References
|
||||
GetRoleId(context.Context, *common.StrIndex) (*common.Reference, error)
|
||||
GetDeviceIds(context.Context, *common.StrIndex) (*common.References, error)
|
||||
GetLogs(context.Context, *common.StrIndex) (*common.References, error)
|
||||
// Common
|
||||
GetActivity(context.Context, *common.StrIndex) (*common.Activity, error)
|
||||
GetMeta(context.Context, *common.StrIndex) (*common.Meta, error)
|
||||
mustEmbedUnimplementedUserServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedUserServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceServer) GetAll(context.Context, *common.StrIndex) (*UserAllInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAll not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetInfo(context.Context, *common.StrIndex) (*UserBaseInfo, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetPassword(context.Context, *common.StrIndex) (*Password, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPassword not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetRoleId(context.Context, *common.StrIndex) (*common.Reference, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetRoleId not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetDeviceIds(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetDeviceIds not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetLogs(context.Context, *common.StrIndex) (*common.References, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetActivity(context.Context, *common.StrIndex) (*common.Activity, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetActivity not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) GetMeta(context.Context, *common.StrIndex) (*common.Meta, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetMeta not implemented")
|
||||
}
|
||||
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
|
||||
|
||||
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to UserServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeUserServiceServer interface {
|
||||
mustEmbedUnimplementedUserServiceServer()
|
||||
}
|
||||
|
||||
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
|
||||
s.RegisterService(&UserService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _UserService_GetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetAll(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.user.UserService/GetAll",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetAll(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.user.UserService/GetInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetInfo(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetPassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.user.UserService/GetPassword",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetPassword(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetRoleId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetRoleId(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.user.UserService/GetRoleId",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetRoleId(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetDeviceIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetDeviceIds(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.user.UserService/GetDeviceIds",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetDeviceIds(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetLogs(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.user.UserService/GetLogs",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetLogs(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetActivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetActivity(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.user.UserService/GetActivity",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetActivity(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _UserService_GetMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(common.StrIndex)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServiceServer).GetMeta(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pagerino.user.UserService/GetMeta",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServiceServer).GetMeta(ctx, req.(*common.StrIndex))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var UserService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pagerino.user.UserService",
|
||||
HandlerType: (*UserServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetAll",
|
||||
Handler: _UserService_GetAll_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetInfo",
|
||||
Handler: _UserService_GetInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPassword",
|
||||
Handler: _UserService_GetPassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetRoleId",
|
||||
Handler: _UserService_GetRoleId_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDeviceIds",
|
||||
Handler: _UserService_GetDeviceIds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetLogs",
|
||||
Handler: _UserService_GetLogs_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetActivity",
|
||||
Handler: _UserService_GetActivity_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetMeta",
|
||||
Handler: _UserService_GetMeta_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "user.proto",
|
||||
}
|
||||
BIN
WebApp/tarball.tar.gz
Normal file
BIN
WebApp/tarball.tar.gz
Normal file
Binary file not shown.
Reference in New Issue
Block a user