mirror of
https://github.com/aykhans/slash-e.git
synced 2025-06-03 07:36:44 +00:00
fix: update shortcut
This commit is contained in:
parent
b73f7070e4
commit
546d87ca0b
@ -56,10 +56,10 @@ func (s *APIV2Service) ListShortcuts(ctx context.Context, _ *apiv2pb.ListShortcu
|
||||
|
||||
func (s *APIV2Service) GetShortcut(ctx context.Context, request *apiv2pb.GetShortcutRequest) (*apiv2pb.GetShortcutResponse, error) {
|
||||
shortcut, err := s.Store.GetShortcut(ctx, &store.FindShortcut{
|
||||
Name: &request.Name,
|
||||
ID: &request.Id,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by name: %v", err)
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by id: %v", err)
|
||||
}
|
||||
if shortcut == nil {
|
||||
return nil, status.Errorf(codes.NotFound, "shortcut not found")
|
||||
@ -93,12 +93,12 @@ func (s *APIV2Service) GetShortcut(ctx context.Context, request *apiv2pb.GetShor
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func (s *APIV2Service) GetShortcutById(ctx context.Context, request *apiv2pb.GetShortcutByIdRequest) (*apiv2pb.GetShortcutByIdResponse, error) {
|
||||
func (s *APIV2Service) GetShortcutByName(ctx context.Context, request *apiv2pb.GetShortcutByNameRequest) (*apiv2pb.GetShortcutByNameResponse, error) {
|
||||
shortcut, err := s.Store.GetShortcut(ctx, &store.FindShortcut{
|
||||
ID: &request.Id,
|
||||
Name: &request.Name,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by id: %v", err)
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by name: %v", err)
|
||||
}
|
||||
if shortcut == nil {
|
||||
return nil, status.Errorf(codes.NotFound, "shortcut not found")
|
||||
@ -119,7 +119,7 @@ func (s *APIV2Service) GetShortcutById(ctx context.Context, request *apiv2pb.Get
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to convert shortcut, err: %v", err)
|
||||
}
|
||||
response := &apiv2pb.GetShortcutByIdResponse{
|
||||
response := &apiv2pb.GetShortcutByNameResponse{
|
||||
Shortcut: composedShortcut,
|
||||
}
|
||||
return response, nil
|
||||
@ -178,7 +178,7 @@ func (s *APIV2Service) UpdateShortcut(ctx context.Context, request *apiv2pb.Upda
|
||||
ID: &request.Shortcut.Id,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by name: %v", err)
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by id: %v", err)
|
||||
}
|
||||
if shortcut == nil {
|
||||
return nil, status.Errorf(codes.NotFound, "shortcut not found")
|
||||
@ -240,10 +240,10 @@ func (s *APIV2Service) DeleteShortcut(ctx context.Context, request *apiv2pb.Dele
|
||||
return nil, status.Errorf(codes.Internal, "failed to get current user, err: %v", err)
|
||||
}
|
||||
shortcut, err := s.Store.GetShortcut(ctx, &store.FindShortcut{
|
||||
Name: &request.Name,
|
||||
ID: &request.Id,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by name: %v", err)
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by id: %v", err)
|
||||
}
|
||||
if shortcut == nil {
|
||||
return nil, status.Errorf(codes.NotFound, "shortcut not found")
|
||||
@ -264,10 +264,10 @@ func (s *APIV2Service) DeleteShortcut(ctx context.Context, request *apiv2pb.Dele
|
||||
|
||||
func (s *APIV2Service) GetShortcutAnalytics(ctx context.Context, request *apiv2pb.GetShortcutAnalyticsRequest) (*apiv2pb.GetShortcutAnalyticsResponse, error) {
|
||||
shortcut, err := s.Store.GetShortcut(ctx, &store.FindShortcut{
|
||||
Name: &request.Name,
|
||||
ID: &request.Id,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by name: %v", err)
|
||||
return nil, status.Errorf(codes.Internal, "failed to get shortcut by id: %v", err)
|
||||
}
|
||||
if shortcut == nil {
|
||||
return nil, status.Errorf(codes.NotFound, "shortcut not found")
|
||||
|
@ -14,7 +14,7 @@
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@mui/joy": "5.0.0-beta.14",
|
||||
"@mui/joy": "5.0.0-beta.19",
|
||||
"@plasmohq/storage": "^1.9.0",
|
||||
"axios": "^1.6.2",
|
||||
"classnames": "^2.3.2",
|
||||
@ -24,29 +24,29 @@
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-hot-toast": "^2.4.1",
|
||||
"zustand": "^4.4.6"
|
||||
"zustand": "^4.4.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bufbuild/buf": "^1.28.1",
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||
"@types/chrome": "^0.0.241",
|
||||
"@types/lodash-es": "^4.17.11",
|
||||
"@types/node": "^20.9.2",
|
||||
"@types/react": "^18.2.37",
|
||||
"@types/react-dom": "^18.2.15",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^20.10.5",
|
||||
"@types/react": "^18.2.45",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||
"@typescript-eslint/parser": "^6.15.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"eslint": "^8.54.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^8.10.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"long": "^5.2.3",
|
||||
"postcss": "^8.4.31",
|
||||
"postcss": "^8.4.32",
|
||||
"prettier": "^2.8.8",
|
||||
"protobufjs": "^7.2.5",
|
||||
"tailwindcss": "^3.3.5",
|
||||
"typescript": "^5.2.2"
|
||||
"tailwindcss": "^3.4.0",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"manifest": {
|
||||
"permissions": [
|
||||
|
1081
frontend/extension/pnpm-lock.yaml
generated
1081
frontend/extension/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -11,13 +11,12 @@
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@fontsource/inter": "^5.0.16",
|
||||
"@mui/joy": "5.0.0-beta.17",
|
||||
"@mui/joy": "5.0.0-beta.19",
|
||||
"@reduxjs/toolkit": "^1.9.7",
|
||||
"classnames": "^2.3.2",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
"dayjs": "^1.11.10",
|
||||
"i18next": "^23.7.8",
|
||||
"i18next": "^23.7.11",
|
||||
"lodash-es": "^4.17.21",
|
||||
"lucide-react": "^0.292.0",
|
||||
"nice-grpc-web": "^3.3.2",
|
||||
@ -26,22 +25,22 @@
|
||||
"react-dom": "^18.2.0",
|
||||
"react-hot-toast": "^2.4.1",
|
||||
"react-i18next": "^13.5.0",
|
||||
"react-router-dom": "^6.20.1",
|
||||
"react-router-dom": "^6.21.1",
|
||||
"react-use": "^17.4.2",
|
||||
"tailwindcss": "^3.3.6",
|
||||
"tailwindcss": "^3.4.0",
|
||||
"zustand": "^4.4.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bufbuild/buf": "^1.28.1",
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
||||
"@typescript-eslint/parser": "^6.12.0",
|
||||
"@types/react": "^18.2.45",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||
"@typescript-eslint/parser": "^6.15.0",
|
||||
"@vitejs/plugin-react-swc": "^3.5.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"eslint": "^8.55.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^8.10.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
@ -50,6 +49,9 @@
|
||||
"prettier": "2.6.2",
|
||||
"protobufjs": "^7.2.5",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.7"
|
||||
"vite": "^5.0.10"
|
||||
},
|
||||
"resolutions": {
|
||||
"csstype": "3.1.2"
|
||||
}
|
||||
}
|
||||
|
979
frontend/web/pnpm-lock.yaml
generated
979
frontend/web/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -6,18 +6,18 @@ import { GetShortcutAnalyticsResponse } from "@/types/proto/api/v2/shortcut_serv
|
||||
import Icon from "./Icon";
|
||||
|
||||
interface Props {
|
||||
shortcutName: string;
|
||||
shortcutId: number;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const AnalyticsView: React.FC<Props> = (props: Props) => {
|
||||
const { shortcutName, className } = props;
|
||||
const { shortcutId, className } = props;
|
||||
const { t } = useTranslation();
|
||||
const [analytics, setAnalytics] = useState<GetShortcutAnalyticsResponse | null>(null);
|
||||
const [selectedDeviceTab, setSelectedDeviceTab] = useState<"os" | "browser">("browser");
|
||||
|
||||
useEffect(() => {
|
||||
shortcutServiceClient.getShortcutAnalytics({ name: shortcutName }).then((response) => {
|
||||
shortcutServiceClient.getShortcutAnalytics({ id: shortcutId }).then((response) => {
|
||||
setAnalytics(response);
|
||||
});
|
||||
}, []);
|
||||
|
@ -62,7 +62,7 @@ const CollectionView = (props: Props) => {
|
||||
<div className="bg-gray-100 dark:bg-zinc-800 px-3 py-2 w-full flex flex-row justify-between items-center rounded-t-lg">
|
||||
<div className="w-auto flex flex-col justify-start items-start mr-2">
|
||||
<div className="w-full truncate">
|
||||
<Link className="leading-6 font-medium dark:text-gray-400" to={`/c/${collection.name}`}>
|
||||
<Link className="leading-6 font-medium dark:text-gray-400" to={`/c/${collection.name}`} unstable_viewTransition>
|
||||
{collection.title}
|
||||
</Link>
|
||||
<span className="ml-1 leading-6 text-gray-500 dark:text-gray-400" onClick={handleCopyCollectionLink}>
|
||||
|
@ -25,7 +25,7 @@ import Icon from "./Icon";
|
||||
import ResourceNameInput from "./ResourceNameInput";
|
||||
|
||||
interface Props {
|
||||
shortcutName?: string;
|
||||
shortcutId?: number;
|
||||
initialShortcut?: Partial<Shortcut>;
|
||||
onClose: () => void;
|
||||
onConfirm?: () => void;
|
||||
@ -36,7 +36,7 @@ interface State {
|
||||
}
|
||||
|
||||
const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
|
||||
const { onClose, onConfirm, shortcutName, initialShortcut } = props;
|
||||
const { onClose, onConfirm, shortcutId, initialShortcut } = props;
|
||||
const { t } = useTranslation();
|
||||
const [state, setState] = useState<State>({
|
||||
shortcutCreate: Shortcut.fromPartial({
|
||||
@ -54,13 +54,13 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
|
||||
const shortcutList = shortcutStore.getShortcutList();
|
||||
const [tag, setTag] = useState<string>("");
|
||||
const tagSuggestions = uniq(shortcutList.map((shortcut) => shortcut.tags).flat());
|
||||
const isCreating = isUndefined(shortcutName);
|
||||
const isCreating = isUndefined(shortcutId);
|
||||
const loadingState = useLoading(!isCreating);
|
||||
const requestState = useLoading(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (shortcutName) {
|
||||
const shortcut = shortcutStore.getShortcutByName(shortcutName);
|
||||
if (shortcutId) {
|
||||
const shortcut = shortcutStore.getShortcutById(shortcutId);
|
||||
if (shortcut) {
|
||||
setState({
|
||||
...state,
|
||||
@ -77,7 +77,7 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
|
||||
loadingState.setFinish();
|
||||
}
|
||||
}
|
||||
}, [shortcutName]);
|
||||
}, [shortcutId]);
|
||||
|
||||
if (loadingState.isLoading) {
|
||||
return null;
|
||||
@ -183,16 +183,14 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
|
||||
}
|
||||
|
||||
try {
|
||||
if (shortcutName) {
|
||||
if (shortcutId) {
|
||||
const originShortcut = shortcutStore.getShortcutById(shortcutId);
|
||||
const updatingShortcut = {
|
||||
...state.shortcutCreate,
|
||||
name: shortcutName,
|
||||
id: shortcutId,
|
||||
tags: tag.split(" ").filter(Boolean),
|
||||
};
|
||||
await shortcutStore.updateShortcut(
|
||||
updatingShortcut,
|
||||
getShortcutUpdateMask(shortcutStore.getShortcutByName(updatingShortcut.name), updatingShortcut)
|
||||
);
|
||||
await shortcutStore.updateShortcut(updatingShortcut, getShortcutUpdateMask(originShortcut, updatingShortcut));
|
||||
} else {
|
||||
await shortcutStore.createShortcut({
|
||||
...state.shortcutCreate,
|
||||
|
@ -19,7 +19,8 @@ const Header: React.FC = () => {
|
||||
const [showAboutDialog, setShowAboutDialog] = useState<boolean>(false);
|
||||
const profile = workspaceStore.profile;
|
||||
const isAdmin = currentUser.role === Role.ADMIN;
|
||||
const shouldShowRouterSwitch = location.pathname === "/" || location.pathname === "/collections";
|
||||
const shouldShowRouterSwitch = location.pathname === "/" || location.pathname === "/collections" || location.pathname === "/memos";
|
||||
const selectedSection = location.pathname === "/" ? "Shortcuts" : location.pathname === "/collections" ? "Collections" : "Memos";
|
||||
|
||||
const handleSignOutButtonClick = async () => {
|
||||
await authServiceClient.signOut({});
|
||||
@ -31,7 +32,7 @@ const Header: React.FC = () => {
|
||||
<div className="w-full bg-gray-50 dark:bg-zinc-800 border-b border-b-gray-200 dark:border-b-zinc-800">
|
||||
<div className="w-full max-w-8xl mx-auto px-3 md:px-12 py-3 flex flex-row justify-between items-center">
|
||||
<div className="flex flex-row justify-start items-center shrink mr-2">
|
||||
<Link to="/" className="cursor-pointer flex flex-row justify-start items-center dark:text-gray-400">
|
||||
<Link to="/" className="cursor-pointer flex flex-row justify-start items-center dark:text-gray-400" unstable_viewTransition>
|
||||
<img id="logo-img" src="/logo.png" className="w-7 h-auto mr-2 -mt-0.5 dark:opacity-80 rounded-full shadow" alt="" />
|
||||
Slash
|
||||
</Link>
|
||||
@ -46,7 +47,7 @@ const Header: React.FC = () => {
|
||||
<Dropdown
|
||||
trigger={
|
||||
<button className="flex flex-row justify-end items-center cursor-pointer">
|
||||
<span className="dark:text-gray-400">{location.pathname === "/" ? "Shortcuts" : "Collections"}</span>
|
||||
<span className="dark:text-gray-400">{selectedSection}</span>
|
||||
<Icon.ChevronsUpDown className="ml-1 w-4 h-auto text-gray-600 dark:text-gray-400" />
|
||||
</button>
|
||||
}
|
||||
@ -54,14 +55,16 @@ const Header: React.FC = () => {
|
||||
actions={
|
||||
<>
|
||||
<Link
|
||||
to="/"
|
||||
className="w-full px-2 flex flex-row justify-start items-center text-left dark:text-gray-400 leading-8 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
|
||||
to="/"
|
||||
unstable_viewTransition
|
||||
>
|
||||
<Icon.SquareSlash className="w-4 h-auto mr-2 opacity-70" /> Shortcuts
|
||||
</Link>
|
||||
<Link
|
||||
to="/collections"
|
||||
className="w-full px-2 flex flex-row justify-start items-center text-left dark:text-gray-400 leading-8 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
|
||||
to="/collections"
|
||||
unstable_viewTransition
|
||||
>
|
||||
<Icon.LibrarySquare className="w-4 h-auto mr-2 opacity-70" /> Collections
|
||||
</Link>
|
||||
@ -84,15 +87,17 @@ const Header: React.FC = () => {
|
||||
actions={
|
||||
<>
|
||||
<Link
|
||||
to="/setting/general"
|
||||
className="w-full px-2 flex flex-row justify-start items-center text-left dark:text-gray-400 leading-8 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
|
||||
to="/setting/general"
|
||||
unstable_viewTransition
|
||||
>
|
||||
<Icon.User className="w-4 h-auto mr-2 opacity-70" /> {t("user.profile")}
|
||||
</Link>
|
||||
{isAdmin && (
|
||||
<Link
|
||||
to="/setting/workspace"
|
||||
className="w-full px-2 flex flex-row justify-start items-center text-left dark:text-gray-400 leading-8 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
|
||||
to="/setting/workspace"
|
||||
unstable_viewTransition
|
||||
>
|
||||
<Icon.Settings className="w-4 h-auto mr-2 opacity-70" /> {t("settings.self")}
|
||||
</Link>
|
||||
|
@ -31,7 +31,7 @@ const ShortcutActionsDropdown = (props: Props) => {
|
||||
content: `Are you sure to delete shortcut \`${shortcut.name}\`? You cannot undo this action.`,
|
||||
style: "danger",
|
||||
onConfirm: async () => {
|
||||
await shortcutStore.deleteShortcut(shortcut.name);
|
||||
await shortcutStore.deleteShortcut(shortcut.id);
|
||||
},
|
||||
});
|
||||
};
|
||||
@ -82,7 +82,7 @@ const ShortcutActionsDropdown = (props: Props) => {
|
||||
|
||||
{showEditDrawer && (
|
||||
<CreateShortcutDrawer
|
||||
shortcutName={shortcut.name}
|
||||
shortcutId={shortcut.id}
|
||||
onClose={() => setShowEditDrawer(false)}
|
||||
onConfirm={() => setShowEditDrawer(false)}
|
||||
/>
|
||||
|
@ -38,8 +38,9 @@ const ShortcutCard = (props: Props) => {
|
||||
<div className="w-full flex flex-row justify-between items-center">
|
||||
<div className="w-[calc(100%-16px)] flex flex-row justify-start items-center mr-1 shrink-0">
|
||||
<Link
|
||||
to={`/shortcut/${shortcut.name}`}
|
||||
className={classNames("w-8 h-8 flex justify-center items-center overflow-clip shrink-0")}
|
||||
to={`/shortcut/${shortcut.id}`}
|
||||
unstable_viewTransition
|
||||
>
|
||||
{favicon ? (
|
||||
<img className="w-full h-auto rounded" src={favicon} decoding="async" loading="lazy" />
|
||||
@ -123,8 +124,9 @@ const ShortcutCard = (props: Props) => {
|
||||
</Tooltip>
|
||||
<Tooltip title="View count" variant="solid" placement="top" arrow>
|
||||
<Link
|
||||
to={`/shortcut/${shortcut.name}#analytics`}
|
||||
className="w-auto leading-5 flex flex-row justify-start items-center flex-nowrap whitespace-nowrap cursor-pointer text-gray-400 text-sm"
|
||||
to={`/shortcut/${shortcut.id}#analytics`}
|
||||
unstable_viewTransition
|
||||
>
|
||||
<Icon.BarChart2 className="w-4 h-auto mr-1 opacity-70" />
|
||||
{t("shortcut.visits", { count: shortcut.viewCount })}
|
||||
|
@ -51,15 +51,13 @@ const Root: React.FC = () => {
|
||||
}, [currentUserSetting]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{isInitialized && (
|
||||
<div className="w-full h-auto flex flex-col justify-start items-start dark:bg-zinc-900">
|
||||
<Header />
|
||||
<Navigator />
|
||||
<Outlet />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
isInitialized && (
|
||||
<div className="w-full h-auto flex flex-col justify-start items-start dark:bg-zinc-900">
|
||||
<Header />
|
||||
<Navigator />
|
||||
<Outlet />
|
||||
</div>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
import "@fontsource/inter";
|
||||
import { CssVarsProvider } from "@mui/joy";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
|
@ -36,7 +36,7 @@ const CollectionSpace = () => {
|
||||
setShortcuts([]);
|
||||
for (const shortcutId of collection.shortcutIds) {
|
||||
try {
|
||||
const shortcut = await shortcutStore.fetchShortcutById(shortcutId);
|
||||
const shortcut = await shortcutStore.getOrFetchShortcutById(shortcutId);
|
||||
setShortcuts((shortcuts) => {
|
||||
return [...shortcuts, shortcut];
|
||||
});
|
||||
|
@ -28,11 +28,11 @@ interface State {
|
||||
const ShortcutDetail = () => {
|
||||
const { t } = useTranslation();
|
||||
const params = useParams();
|
||||
const shortcutName = params["*"] || "";
|
||||
const shortcutId = Number(params["shortcutId"]);
|
||||
const navigateTo = useNavigateTo();
|
||||
const shortcutStore = useShortcutStore();
|
||||
const userStore = useUserStore();
|
||||
const shortcut = shortcutStore.getShortcutByName(shortcutName);
|
||||
const shortcut = shortcutStore.getShortcutById(shortcutId);
|
||||
const currentUser = useUserStore().getCurrentUser();
|
||||
const [state, setState] = useState<State>({
|
||||
showEditDrawer: false,
|
||||
@ -46,11 +46,11 @@ const ShortcutDetail = () => {
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const shortcut = await shortcutStore.getOrFetchShortcutByName(shortcutName);
|
||||
const shortcut = await shortcutStore.getOrFetchShortcutById(shortcutId);
|
||||
await userStore.getOrFetchUserById(shortcut.creatorId);
|
||||
loadingState.setFinish();
|
||||
})();
|
||||
}, [shortcutName]);
|
||||
}, [shortcutId]);
|
||||
|
||||
if (loadingState.isLoading) {
|
||||
return null;
|
||||
@ -67,7 +67,7 @@ const ShortcutDetail = () => {
|
||||
content: `Are you sure to delete shortcut \`${shortcut.name}\`? You cannot undo this action.`,
|
||||
style: "danger",
|
||||
onConfirm: async () => {
|
||||
await shortcutStore.deleteShortcut(shortcut.name);
|
||||
await shortcutStore.deleteShortcut(shortcut.id);
|
||||
navigateTo("/", {
|
||||
replace: true,
|
||||
});
|
||||
@ -198,7 +198,7 @@ const ShortcutDetail = () => {
|
||||
<Icon.BarChart2 className="w-6 h-auto mr-1" />
|
||||
{t("analytics.self")}
|
||||
</h3>
|
||||
<AnalyticsView className="mt-4 w-full grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-4" shortcutName={shortcut.name} />
|
||||
<AnalyticsView className="mt-4 w-full grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-4" shortcutId={shortcut.id} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -206,7 +206,7 @@ const ShortcutDetail = () => {
|
||||
|
||||
{state.showEditDrawer && (
|
||||
<CreateShortcutDrawer
|
||||
shortcutName={shortcut.name}
|
||||
shortcutId={shortcut.id}
|
||||
onClose={() =>
|
||||
setState({
|
||||
...state,
|
||||
|
@ -1,19 +1,21 @@
|
||||
import { useEffect } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { isURL } from "@/helpers/utils";
|
||||
import useShortcutStore from "@/stores/v1/shortcut";
|
||||
import { Shortcut } from "@/types/proto/api/v2/shortcut_service";
|
||||
|
||||
const ShortcutSpace = () => {
|
||||
const params = useParams();
|
||||
const shortcutName = params["*"] || "";
|
||||
const shortcutStore = useShortcutStore();
|
||||
const shortcut = shortcutStore.getShortcutByName(shortcutName);
|
||||
const [shortcut, setShortcut] = useState<Shortcut>();
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
try {
|
||||
await shortcutStore.getOrFetchShortcutByName(shortcutName, true);
|
||||
const shortcut = await shortcutStore.fetchShortcutByName(shortcutName);
|
||||
setShortcut(shortcut);
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
toast.error(error.details);
|
||||
|
@ -100,7 +100,7 @@ const SignIn: React.FC = () => {
|
||||
{workspaceStore.profile.enableSignup && (
|
||||
<p className="w-full mt-4 text-sm">
|
||||
<span className="dark:text-gray-500">{"Don't have an account yet?"}</span>
|
||||
<Link to="/auth/signup" className="cursor-pointer ml-2 text-blue-600 hover:underline">
|
||||
<Link className="cursor-pointer ml-2 text-blue-600 hover:underline" to="/auth/signup" unstable_viewTransition>
|
||||
{t("auth.sign-up")}
|
||||
</Link>
|
||||
</p>
|
||||
|
@ -115,7 +115,7 @@ const SignUp: React.FC = () => {
|
||||
</form>
|
||||
<p className="w-full mt-4 text-sm">
|
||||
<span className="dark:text-gray-500">{"Already has an account?"}</span>
|
||||
<Link to="/auth" className="cursor-pointer ml-2 text-blue-600 hover:underline">
|
||||
<Link className="cursor-pointer ml-2 text-blue-600 hover:underline" to="/auth" unstable_viewTransition>
|
||||
{t("auth.sign-in")}
|
||||
</Link>
|
||||
</p>
|
||||
|
@ -73,7 +73,10 @@ const SubscriptionSetting: React.FC = () => {
|
||||
<div className="max-w-4xl mx-auto mb-12">
|
||||
<Alert className="!inline-block mb-12">
|
||||
Slash is open source bookmarks and link sharing platform. Our source code is available and accessible on{" "}
|
||||
<Link href="https://github.com/yourselfhosted/slash">GitHub</Link> so anyone can get it, inspect it and review it.
|
||||
<Link href="https://github.com/yourselfhosted/slash" target="_blank">
|
||||
GitHub
|
||||
</Link>{" "}
|
||||
so anyone can get it, inspect it and review it.
|
||||
</Alert>
|
||||
</div>
|
||||
<div className="w-full grid grid-cols-1 gap-6 lg:gap-12 mt-8 md:grid-cols-3 md:max-w-4xl mx-auto">
|
||||
|
@ -35,7 +35,7 @@ const WorkspaceSetting: React.FC = () => {
|
||||
<div className="mt-2">
|
||||
<span className="text-gray-500 mr-2">Current plan:</span>
|
||||
<span className="text-2xl mr-4 dark:text-gray-400">{stringifyPlanType(profile.plan)}</span>
|
||||
<Link to="/setting/subscription">
|
||||
<Link to="/setting/subscription" unstable_viewTransition>
|
||||
<Button size="sm" variant="outlined" startDecorator={<Icon.Settings className="w-4 h-auto" />}>
|
||||
Manage
|
||||
</Button>
|
||||
|
@ -39,7 +39,7 @@ const router = createBrowserRouter([
|
||||
element: <CollectionDashboard />,
|
||||
},
|
||||
{
|
||||
path: "/shortcut/*",
|
||||
path: "/shortcut/:shortcutId",
|
||||
element: <ShortcutDetail />,
|
||||
},
|
||||
{
|
||||
|
@ -1,100 +1,99 @@
|
||||
import { isEqual } from "lodash-es";
|
||||
import { create } from "zustand";
|
||||
import { combine } from "zustand/middleware";
|
||||
import { shortcutServiceClient } from "@/grpcweb";
|
||||
import { Shortcut } from "@/types/proto/api/v2/shortcut_service";
|
||||
|
||||
interface ShortcutState {
|
||||
shortcutMapByName: Record<string, Shortcut>;
|
||||
fetchShortcutList: () => Promise<Shortcut[]>;
|
||||
fetchShortcutById: (id: number) => Promise<Shortcut>;
|
||||
getOrFetchShortcutByName: (name: string, recordView?: boolean) => Promise<Shortcut>;
|
||||
getShortcutByName: (name: string) => Shortcut;
|
||||
getShortcutList: () => Shortcut[];
|
||||
createShortcut: (shortcut: Shortcut) => Promise<Shortcut>;
|
||||
updateShortcut: (shortcut: Partial<Shortcut>, updateMask: string[]) => Promise<Shortcut>;
|
||||
deleteShortcut: (name: string) => Promise<void>;
|
||||
interface State {
|
||||
shortcutMapById: Record<number, Shortcut>;
|
||||
}
|
||||
|
||||
const useShortcutStore = create<ShortcutState>()((set, get) => ({
|
||||
shortcutMapById: {},
|
||||
shortcutMapByName: {},
|
||||
fetchShortcutList: async () => {
|
||||
const { shortcuts } = await shortcutServiceClient.listShortcuts({});
|
||||
const shortcutMap = get().shortcutMapByName;
|
||||
shortcuts.forEach((shortcut) => {
|
||||
shortcutMap[shortcut.name] = shortcut;
|
||||
});
|
||||
set(shortcutMap);
|
||||
return shortcuts;
|
||||
},
|
||||
fetchShortcutById: async (id: number) => {
|
||||
const { shortcut } = await shortcutServiceClient.getShortcutById({
|
||||
id: id,
|
||||
});
|
||||
if (!shortcut) {
|
||||
throw new Error(`Shortcut with id ${id} not found`);
|
||||
}
|
||||
return shortcut;
|
||||
},
|
||||
getOrFetchShortcutByName: async (name: string, recordView = false) => {
|
||||
const shortcutMap = get().shortcutMapByName;
|
||||
if (shortcutMap[name]) {
|
||||
return shortcutMap[name] as Shortcut;
|
||||
}
|
||||
const getDefaultState = (): State => {
|
||||
return {
|
||||
shortcutMapById: {},
|
||||
};
|
||||
};
|
||||
|
||||
const { shortcut } = await shortcutServiceClient.getShortcut({
|
||||
name,
|
||||
recordView,
|
||||
});
|
||||
if (!shortcut) {
|
||||
throw new Error(`Shortcut with name ${name} not found`);
|
||||
}
|
||||
const useShortcutStore = create(
|
||||
combine(getDefaultState(), (set, get) => ({
|
||||
fetchShortcutList: async () => {
|
||||
const { shortcuts } = await shortcutServiceClient.listShortcuts({});
|
||||
const shortcutMap = get().shortcutMapById;
|
||||
shortcuts.forEach((shortcut) => {
|
||||
shortcutMap[shortcut.id] = shortcut;
|
||||
});
|
||||
set({ shortcutMapById: shortcutMap });
|
||||
return shortcuts;
|
||||
},
|
||||
fetchShortcutByName: async (name: string) => {
|
||||
const { shortcut } = await shortcutServiceClient.getShortcutByName({
|
||||
name,
|
||||
});
|
||||
if (!shortcut) {
|
||||
throw new Error(`Shortcut with name ${name} not found`);
|
||||
}
|
||||
return shortcut;
|
||||
},
|
||||
getOrFetchShortcutById: async (id: number, recordView = false) => {
|
||||
const shortcutMap = get().shortcutMapById;
|
||||
if (shortcutMap[id]) {
|
||||
return shortcutMap[id] as Shortcut;
|
||||
}
|
||||
|
||||
shortcutMap[name] = shortcut;
|
||||
set(shortcutMap);
|
||||
return shortcut;
|
||||
},
|
||||
getShortcutByName: (name: string) => {
|
||||
const shortcutMap = get().shortcutMapByName;
|
||||
return shortcutMap[name] || unknownShortcut;
|
||||
},
|
||||
getShortcutList: () => {
|
||||
return Object.values(get().shortcutMapByName);
|
||||
},
|
||||
createShortcut: async (shortcut: Shortcut) => {
|
||||
const { shortcut: createdShortcut } = await shortcutServiceClient.createShortcut({
|
||||
shortcut: shortcut,
|
||||
});
|
||||
if (!createdShortcut) {
|
||||
throw new Error(`Failed to create shortcut`);
|
||||
}
|
||||
const shortcutMap = get().shortcutMapByName;
|
||||
shortcutMap[createdShortcut.name] = createdShortcut;
|
||||
set(shortcutMap);
|
||||
return createdShortcut;
|
||||
},
|
||||
updateShortcut: async (shortcut: Partial<Shortcut>, updateMask: string[]) => {
|
||||
const { shortcut: updatedShortcut } = await shortcutServiceClient.updateShortcut({
|
||||
shortcut: shortcut,
|
||||
updateMask,
|
||||
});
|
||||
if (!updatedShortcut) {
|
||||
throw new Error(`Failed to update shortcut`);
|
||||
}
|
||||
const shortcutMap = get().shortcutMapByName;
|
||||
shortcutMap[updatedShortcut.name] = updatedShortcut;
|
||||
set(shortcutMap);
|
||||
return updatedShortcut;
|
||||
},
|
||||
deleteShortcut: async (name: string) => {
|
||||
await shortcutServiceClient.deleteShortcut({
|
||||
name,
|
||||
});
|
||||
const shortcutMap = get().shortcutMapByName;
|
||||
delete shortcutMap[name];
|
||||
set(shortcutMap);
|
||||
},
|
||||
}));
|
||||
const { shortcut } = await shortcutServiceClient.getShortcut({
|
||||
id,
|
||||
recordView,
|
||||
});
|
||||
if (!shortcut) {
|
||||
throw new Error(`Shortcut with id ${id} not found`);
|
||||
}
|
||||
|
||||
shortcutMap[id] = shortcut;
|
||||
set({ shortcutMapById: shortcutMap });
|
||||
return shortcut;
|
||||
},
|
||||
getShortcutById: (id: number) => {
|
||||
const shortcutMap = get().shortcutMapById;
|
||||
return shortcutMap[id] || unknownShortcut;
|
||||
},
|
||||
getShortcutList: () => {
|
||||
return Object.values(get().shortcutMapById);
|
||||
},
|
||||
createShortcut: async (shortcut: Shortcut) => {
|
||||
const { shortcut: createdShortcut } = await shortcutServiceClient.createShortcut({
|
||||
shortcut: shortcut,
|
||||
});
|
||||
if (!createdShortcut) {
|
||||
throw new Error(`Failed to create shortcut`);
|
||||
}
|
||||
const shortcutMap = get().shortcutMapById;
|
||||
shortcutMap[createdShortcut.id] = createdShortcut;
|
||||
set({ shortcutMapById: shortcutMap });
|
||||
return createdShortcut;
|
||||
},
|
||||
updateShortcut: async (shortcut: Partial<Shortcut>, updateMask: string[]) => {
|
||||
const { shortcut: updatedShortcut } = await shortcutServiceClient.updateShortcut({
|
||||
shortcut: shortcut,
|
||||
updateMask,
|
||||
});
|
||||
if (!updatedShortcut) {
|
||||
throw new Error(`Failed to update shortcut`);
|
||||
}
|
||||
const shortcutMap = get().shortcutMapById;
|
||||
shortcutMap[updatedShortcut.id] = updatedShortcut;
|
||||
set({ shortcutMapById: shortcutMap });
|
||||
return updatedShortcut;
|
||||
},
|
||||
deleteShortcut: async (id: number) => {
|
||||
await shortcutServiceClient.deleteShortcut({
|
||||
id,
|
||||
});
|
||||
const shortcutMap = get().shortcutMapById;
|
||||
delete shortcutMap[id];
|
||||
set({ shortcutMapById: shortcutMap });
|
||||
},
|
||||
}))
|
||||
);
|
||||
|
||||
const unknownShortcut: Shortcut = Shortcut.fromPartial({
|
||||
id: -1,
|
||||
|
@ -15,13 +15,13 @@ service ShortcutService {
|
||||
rpc ListShortcuts(ListShortcutsRequest) returns (ListShortcutsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/shortcuts"};
|
||||
}
|
||||
// GetShortcut returns a shortcut by name.
|
||||
// GetShortcut returns a shortcut by id.
|
||||
rpc GetShortcut(GetShortcutRequest) returns (GetShortcutResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/shortcuts/{name}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
option (google.api.http) = {get: "/api/v2/shortcuts/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
// GetShortcutById returns a shortcut by id.
|
||||
rpc GetShortcutById(GetShortcutByIdRequest) returns (GetShortcutByIdResponse) {}
|
||||
// GetShortcutByName returns a shortcut by name.
|
||||
rpc GetShortcutByName(GetShortcutByNameRequest) returns (GetShortcutByNameResponse) {}
|
||||
// CreateShortcut creates a shortcut.
|
||||
rpc CreateShortcut(CreateShortcutRequest) returns (CreateShortcutResponse) {
|
||||
option (google.api.http) = {
|
||||
@ -32,20 +32,20 @@ service ShortcutService {
|
||||
// UpdateShortcut updates a shortcut.
|
||||
rpc UpdateShortcut(UpdateShortcutRequest) returns (UpdateShortcutResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v2/shortcuts/{shortcut.name}"
|
||||
put: "/api/v2/shortcuts/{shortcut.id}"
|
||||
body: "shortcut"
|
||||
};
|
||||
option (google.api.method_signature) = "shortcut,update_mask";
|
||||
}
|
||||
// DeleteShortcut deletes a shortcut by name.
|
||||
rpc DeleteShortcut(DeleteShortcutRequest) returns (DeleteShortcutResponse) {
|
||||
option (google.api.http) = {delete: "/api/v2/shortcuts/{name}"};
|
||||
option (google.api.method_signature) = "name";
|
||||
option (google.api.http) = {delete: "/api/v2/shortcuts/{id}"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
// GetShortcutAnalytics returns the analytics for a shortcut.
|
||||
rpc GetShortcutAnalytics(GetShortcutAnalyticsRequest) returns (GetShortcutAnalyticsResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/shortcuts/{name}/analytics"};
|
||||
option (google.api.method_signature) = "name";
|
||||
option (google.api.http) = {get: "/api/v2/shortcuts/{id}/analytics"};
|
||||
option (google.api.method_signature) = "id";
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ message ListShortcutsResponse {
|
||||
}
|
||||
|
||||
message GetShortcutRequest {
|
||||
string name = 1;
|
||||
int32 id = 1;
|
||||
|
||||
bool record_view = 2;
|
||||
}
|
||||
@ -101,11 +101,11 @@ message GetShortcutResponse {
|
||||
Shortcut shortcut = 1;
|
||||
}
|
||||
|
||||
message GetShortcutByIdRequest {
|
||||
int32 id = 1;
|
||||
message GetShortcutByNameRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message GetShortcutByIdResponse {
|
||||
message GetShortcutByNameResponse {
|
||||
Shortcut shortcut = 1;
|
||||
}
|
||||
|
||||
@ -128,13 +128,13 @@ message UpdateShortcutResponse {
|
||||
}
|
||||
|
||||
message DeleteShortcutRequest {
|
||||
string name = 1;
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteShortcutResponse {}
|
||||
|
||||
message GetShortcutAnalyticsRequest {
|
||||
string name = 1;
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message GetShortcutAnalyticsResponse {
|
||||
|
@ -83,8 +83,8 @@
|
||||
- [GetShortcutAnalyticsRequest](#slash-api-v2-GetShortcutAnalyticsRequest)
|
||||
- [GetShortcutAnalyticsResponse](#slash-api-v2-GetShortcutAnalyticsResponse)
|
||||
- [GetShortcutAnalyticsResponse.AnalyticsItem](#slash-api-v2-GetShortcutAnalyticsResponse-AnalyticsItem)
|
||||
- [GetShortcutByIdRequest](#slash-api-v2-GetShortcutByIdRequest)
|
||||
- [GetShortcutByIdResponse](#slash-api-v2-GetShortcutByIdResponse)
|
||||
- [GetShortcutByNameRequest](#slash-api-v2-GetShortcutByNameRequest)
|
||||
- [GetShortcutByNameResponse](#slash-api-v2-GetShortcutByNameResponse)
|
||||
- [GetShortcutRequest](#slash-api-v2-GetShortcutRequest)
|
||||
- [GetShortcutResponse](#slash-api-v2-GetShortcutResponse)
|
||||
- [ListShortcutsRequest](#slash-api-v2-ListShortcutsRequest)
|
||||
@ -1096,7 +1096,7 @@
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| name | [string](#string) | | |
|
||||
| id | [int32](#int32) | | |
|
||||
|
||||
|
||||
|
||||
@ -1121,7 +1121,7 @@
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| name | [string](#string) | | |
|
||||
| id | [int32](#int32) | | |
|
||||
|
||||
|
||||
|
||||
@ -1161,24 +1161,24 @@
|
||||
|
||||
|
||||
|
||||
<a name="slash-api-v2-GetShortcutByIdRequest"></a>
|
||||
<a name="slash-api-v2-GetShortcutByNameRequest"></a>
|
||||
|
||||
### GetShortcutByIdRequest
|
||||
### GetShortcutByNameRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| id | [int32](#int32) | | |
|
||||
| name | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="slash-api-v2-GetShortcutByIdResponse"></a>
|
||||
<a name="slash-api-v2-GetShortcutByNameResponse"></a>
|
||||
|
||||
### GetShortcutByIdResponse
|
||||
### GetShortcutByNameResponse
|
||||
|
||||
|
||||
|
||||
@ -1199,7 +1199,7 @@
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| name | [string](#string) | | |
|
||||
| id | [int32](#int32) | | |
|
||||
| record_view | [bool](#bool) | | |
|
||||
|
||||
|
||||
@ -1336,8 +1336,8 @@
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| ListShortcuts | [ListShortcutsRequest](#slash-api-v2-ListShortcutsRequest) | [ListShortcutsResponse](#slash-api-v2-ListShortcutsResponse) | ListShortcuts returns a list of shortcuts. |
|
||||
| GetShortcut | [GetShortcutRequest](#slash-api-v2-GetShortcutRequest) | [GetShortcutResponse](#slash-api-v2-GetShortcutResponse) | GetShortcut returns a shortcut by name. |
|
||||
| GetShortcutById | [GetShortcutByIdRequest](#slash-api-v2-GetShortcutByIdRequest) | [GetShortcutByIdResponse](#slash-api-v2-GetShortcutByIdResponse) | GetShortcutById returns a shortcut by id. |
|
||||
| GetShortcut | [GetShortcutRequest](#slash-api-v2-GetShortcutRequest) | [GetShortcutResponse](#slash-api-v2-GetShortcutResponse) | GetShortcut returns a shortcut by id. |
|
||||
| GetShortcutByName | [GetShortcutByNameRequest](#slash-api-v2-GetShortcutByNameRequest) | [GetShortcutByNameResponse](#slash-api-v2-GetShortcutByNameResponse) | GetShortcutByName returns a shortcut by name. |
|
||||
| CreateShortcut | [CreateShortcutRequest](#slash-api-v2-CreateShortcutRequest) | [CreateShortcutResponse](#slash-api-v2-CreateShortcutResponse) | CreateShortcut creates a shortcut. |
|
||||
| UpdateShortcut | [UpdateShortcutRequest](#slash-api-v2-UpdateShortcutRequest) | [UpdateShortcutResponse](#slash-api-v2-UpdateShortcutResponse) | UpdateShortcut updates a shortcut. |
|
||||
| DeleteShortcut | [DeleteShortcutRequest](#slash-api-v2-DeleteShortcutRequest) | [DeleteShortcutResponse](#slash-api-v2-DeleteShortcutResponse) | DeleteShortcut deletes a shortcut by name. |
|
||||
|
@ -319,8 +319,8 @@ type GetShortcutRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
RecordView bool `protobuf:"varint,2,opt,name=record_view,json=recordView,proto3" json:"record_view,omitempty"`
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
RecordView bool `protobuf:"varint,2,opt,name=record_view,json=recordView,proto3" json:"record_view,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetShortcutRequest) Reset() {
|
||||
@ -355,11 +355,11 @@ func (*GetShortcutRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_shortcut_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *GetShortcutRequest) GetName() string {
|
||||
func (x *GetShortcutRequest) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetShortcutRequest) GetRecordView() bool {
|
||||
@ -416,16 +416,16 @@ func (x *GetShortcutResponse) GetShortcut() *Shortcut {
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetShortcutByIdRequest struct {
|
||||
type GetShortcutByNameRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetShortcutByIdRequest) Reset() {
|
||||
*x = GetShortcutByIdRequest{}
|
||||
func (x *GetShortcutByNameRequest) Reset() {
|
||||
*x = GetShortcutByNameRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_shortcut_service_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -433,13 +433,13 @@ func (x *GetShortcutByIdRequest) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetShortcutByIdRequest) String() string {
|
||||
func (x *GetShortcutByNameRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetShortcutByIdRequest) ProtoMessage() {}
|
||||
func (*GetShortcutByNameRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetShortcutByIdRequest) ProtoReflect() protoreflect.Message {
|
||||
func (x *GetShortcutByNameRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_shortcut_service_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -451,19 +451,19 @@ func (x *GetShortcutByIdRequest) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetShortcutByIdRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetShortcutByIdRequest) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use GetShortcutByNameRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetShortcutByNameRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_shortcut_service_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetShortcutByIdRequest) GetId() int32 {
|
||||
func (x *GetShortcutByNameRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
return x.Name
|
||||
}
|
||||
return 0
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetShortcutByIdResponse struct {
|
||||
type GetShortcutByNameResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@ -471,8 +471,8 @@ type GetShortcutByIdResponse struct {
|
||||
Shortcut *Shortcut `protobuf:"bytes,1,opt,name=shortcut,proto3" json:"shortcut,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetShortcutByIdResponse) Reset() {
|
||||
*x = GetShortcutByIdResponse{}
|
||||
func (x *GetShortcutByNameResponse) Reset() {
|
||||
*x = GetShortcutByNameResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_v2_shortcut_service_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -480,13 +480,13 @@ func (x *GetShortcutByIdResponse) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetShortcutByIdResponse) String() string {
|
||||
func (x *GetShortcutByNameResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetShortcutByIdResponse) ProtoMessage() {}
|
||||
func (*GetShortcutByNameResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetShortcutByIdResponse) ProtoReflect() protoreflect.Message {
|
||||
func (x *GetShortcutByNameResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_v2_shortcut_service_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@ -498,12 +498,12 @@ func (x *GetShortcutByIdResponse) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetShortcutByIdResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetShortcutByIdResponse) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use GetShortcutByNameResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetShortcutByNameResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_shortcut_service_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *GetShortcutByIdResponse) GetShortcut() *Shortcut {
|
||||
func (x *GetShortcutByNameResponse) GetShortcut() *Shortcut {
|
||||
if x != nil {
|
||||
return x.Shortcut
|
||||
}
|
||||
@ -711,7 +711,7 @@ type DeleteShortcutRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteShortcutRequest) Reset() {
|
||||
@ -746,11 +746,11 @@ func (*DeleteShortcutRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_shortcut_service_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *DeleteShortcutRequest) GetName() string {
|
||||
func (x *DeleteShortcutRequest) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeleteShortcutResponse struct {
|
||||
@ -796,7 +796,7 @@ type GetShortcutAnalyticsRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetShortcutAnalyticsRequest) Reset() {
|
||||
@ -831,11 +831,11 @@ func (*GetShortcutAnalyticsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_v2_shortcut_service_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *GetShortcutAnalyticsRequest) GetName() string {
|
||||
func (x *GetShortcutAnalyticsRequest) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetShortcutAnalyticsResponse struct {
|
||||
@ -1015,148 +1015,148 @@ var file_api_v2_shortcut_service_proto_rawDesc = []byte{
|
||||
0x65, 0x12, 0x34, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x09, 0x73, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x22, 0x49, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x76, 0x69, 0x65, 0x77,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, 0x69,
|
||||
0x65, 0x77, 0x22, 0x49, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x68, 0x6f,
|
||||
0x72, 0x74, 0x63, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c,
|
||||
0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74,
|
||||
0x63, 0x75, 0x74, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x28, 0x0a,
|
||||
0x16, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x42, 0x79, 0x49, 0x64,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x08, 0x73, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x4b, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x22, 0x45, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a,
|
||||
0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, 0x69, 0x65, 0x77, 0x22, 0x49,
|
||||
0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75,
|
||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52,
|
||||
0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x2e, 0x0a, 0x18, 0x47, 0x65, 0x74,
|
||||
0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x19, 0x47, 0x65, 0x74,
|
||||
0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63,
|
||||
0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x4b, 0x0a, 0x15, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x08, 0x73,
|
||||
0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x4c, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x08, 0x73, 0x68, 0x6f,
|
||||
0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x32, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74,
|
||||
0x63, 0x75, 0x74, 0x22, 0x4c, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f,
|
||||
0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a,
|
||||
0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x16, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53,
|
||||
0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75,
|
||||
0x74, 0x22, 0x88, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72,
|
||||
0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x08, 0x73,
|
||||
0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e,
|
||||
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f,
|
||||
0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12,
|
||||
0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b,
|
||||
0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4c, 0x0a, 0x16,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63,
|
||||
0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x2b, 0x0a, 0x15, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x63, 0x75, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,
|
||||
0x73, 0x6b, 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, 0x46, 0x69, 0x65, 0x6c, 0x64,
|
||||
0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b,
|
||||
0x22, 0x4c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63,
|
||||
0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73,
|
||||
0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x6f, 0x72,
|
||||
0x74, 0x63, 0x75, 0x74, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x27,
|
||||
0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x31, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x65, 0x22, 0x2d, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdd, 0x02, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72,
|
||||
0x74, 0x63, 0x75, 0x74, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
|
||||
0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x6c, 0x61, 0x73,
|
||||
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72,
|
||||
0x74, 0x63, 0x75, 0x74, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x52, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12,
|
||||
0x52, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x38, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x41, 0x6e, 0x61, 0x6c, 0x79,
|
||||
0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6e, 0x61,
|
||||
0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x08, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x73, 0x18,
|
||||
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
|
||||
0x22, 0xdd, 0x02, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x58, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52,
|
||||
0x08, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x73, 0x1a, 0x39, 0x0a, 0x0d, 0x41, 0x6e, 0x61,
|
||||
0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x32, 0xbc, 0x07, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75,
|
||||
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x73, 0x6c, 0x61, 0x73,
|
||||
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x6f,
|
||||
0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e,
|
||||
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x32, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x12, 0x7b, 0x0a,
|
||||
0x0b, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12, 0x20, 0x2e, 0x73,
|
||||
0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x07, 0x64,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73,
|
||||
0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53,
|
||||
0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
|
||||
0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x27, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a,
|
||||
0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63,
|
||||
0x75, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x60, 0x0a, 0x0f, 0x47, 0x65,
|
||||
0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x24, 0x2e,
|
||||
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x42, 0x79,
|
||||
0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a,
|
||||
0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12,
|
||||
0x23, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63,
|
||||
0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x1d, 0x3a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x11, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x12,
|
||||
0xa7, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63,
|
||||
0x75, 0x74, 0x12, 0x23, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f,
|
||||
0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0xda,
|
||||
0x41, 0x14, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x08, 0x73, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x1a, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f,
|
||||
0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x68, 0x6f, 0x72, 0x74,
|
||||
0x63, 0x75, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x0e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x73,
|
||||
0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x24, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x2a, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f,
|
||||
0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d,
|
||||
0x12, 0xa0, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x73, 0x6c, 0x61, 0x73,
|
||||
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72,
|
||||
0x74, 0x63, 0x75, 0x74, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x41,
|
||||
0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x31, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12,
|
||||
0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75,
|
||||
0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74,
|
||||
0x69, 0x63, 0x73, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6c, 0x61, 0x73,
|
||||
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x14, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63,
|
||||
0x75, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
|
||||
0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x79, 0x6f, 0x75,
|
||||
0x72, 0x73, 0x65, 0x6c, 0x66, 0x68, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x2f, 0x73, 0x6c, 0x61, 0x73,
|
||||
0x68, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02,
|
||||
0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c,
|
||||
0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x53,
|
||||
0x6c, 0x61, 0x73, 0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x3a,
|
||||
0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69,
|
||||
0x63, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12,
|
||||
0x54, 0x0a, 0x08, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x38, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x41, 0x6e, 0x61, 0x6c,
|
||||
0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6e,
|
||||
0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x62, 0x72, 0x6f,
|
||||
0x77, 0x73, 0x65, 0x72, 0x73, 0x1a, 0x39, 0x0a, 0x0d, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69,
|
||||
0x63, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x32, 0xb4, 0x07, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x6f, 0x72,
|
||||
0x74, 0x63, 0x75, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75,
|
||||
0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x6c, 0x61, 0x73,
|
||||
0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x68, 0x6f,
|
||||
0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f,
|
||||
0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x12, 0x77, 0x0a, 0x0b, 0x47, 0x65, 0x74,
|
||||
0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12, 0x20, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74,
|
||||
0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x6c, 0x61,
|
||||
0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f,
|
||||
0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xda,
|
||||
0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x32, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x2f, 0x7b, 0x69,
|
||||
0x64, 0x7d, 0x12, 0x66, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75,
|
||||
0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63,
|
||||
0x75, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x27, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01, 0x0a, 0x0e, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12, 0x23, 0x2e,
|
||||
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d,
|
||||
0x3a, 0x08, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x32, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x12, 0xa5, 0x01,
|
||||
0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74,
|
||||
0x12, 0x23, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74,
|
||||
0x63, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0xda, 0x41, 0x14,
|
||||
0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,
|
||||
0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x08, 0x73, 0x68, 0x6f, 0x72,
|
||||
0x74, 0x63, 0x75, 0x74, 0x1a, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75,
|
||||
0x74, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x12, 0x23, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e,
|
||||
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x23, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18,
|
||||
0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x63,
|
||||
0x75, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9c, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74,
|
||||
0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63,
|
||||
0x73, 0x12, 0x29, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x41, 0x6e, 0x61, 0x6c,
|
||||
0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x73,
|
||||
0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53,
|
||||
0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73,
|
||||
0x68, 0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x6e,
|
||||
0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x14, 0x53, 0x68,
|
||||
0x6f, 0x72, 0x74, 0x63, 0x75, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x79, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x6c, 0x66, 0x68, 0x6f, 0x73, 0x74, 0x65, 0x64, 0x2f,
|
||||
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x53,
|
||||
0x41, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56,
|
||||
0x32, 0xca, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32,
|
||||
0xe2, 0x02, 0x18, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c,
|
||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6c,
|
||||
0x61, 0x73, 0x68, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -1179,8 +1179,8 @@ var file_api_v2_shortcut_service_proto_goTypes = []interface{}{
|
||||
(*ListShortcutsResponse)(nil), // 3: slash.api.v2.ListShortcutsResponse
|
||||
(*GetShortcutRequest)(nil), // 4: slash.api.v2.GetShortcutRequest
|
||||
(*GetShortcutResponse)(nil), // 5: slash.api.v2.GetShortcutResponse
|
||||
(*GetShortcutByIdRequest)(nil), // 6: slash.api.v2.GetShortcutByIdRequest
|
||||
(*GetShortcutByIdResponse)(nil), // 7: slash.api.v2.GetShortcutByIdResponse
|
||||
(*GetShortcutByNameRequest)(nil), // 6: slash.api.v2.GetShortcutByNameRequest
|
||||
(*GetShortcutByNameResponse)(nil), // 7: slash.api.v2.GetShortcutByNameResponse
|
||||
(*CreateShortcutRequest)(nil), // 8: slash.api.v2.CreateShortcutRequest
|
||||
(*CreateShortcutResponse)(nil), // 9: slash.api.v2.CreateShortcutResponse
|
||||
(*UpdateShortcutRequest)(nil), // 10: slash.api.v2.UpdateShortcutRequest
|
||||
@ -1203,7 +1203,7 @@ var file_api_v2_shortcut_service_proto_depIdxs = []int32{
|
||||
1, // 4: slash.api.v2.Shortcut.og_metadata:type_name -> slash.api.v2.OpenGraphMetadata
|
||||
0, // 5: slash.api.v2.ListShortcutsResponse.shortcuts:type_name -> slash.api.v2.Shortcut
|
||||
0, // 6: slash.api.v2.GetShortcutResponse.shortcut:type_name -> slash.api.v2.Shortcut
|
||||
0, // 7: slash.api.v2.GetShortcutByIdResponse.shortcut:type_name -> slash.api.v2.Shortcut
|
||||
0, // 7: slash.api.v2.GetShortcutByNameResponse.shortcut:type_name -> slash.api.v2.Shortcut
|
||||
0, // 8: slash.api.v2.CreateShortcutRequest.shortcut:type_name -> slash.api.v2.Shortcut
|
||||
0, // 9: slash.api.v2.CreateShortcutResponse.shortcut:type_name -> slash.api.v2.Shortcut
|
||||
0, // 10: slash.api.v2.UpdateShortcutRequest.shortcut:type_name -> slash.api.v2.Shortcut
|
||||
@ -1214,14 +1214,14 @@ var file_api_v2_shortcut_service_proto_depIdxs = []int32{
|
||||
16, // 15: slash.api.v2.GetShortcutAnalyticsResponse.browsers:type_name -> slash.api.v2.GetShortcutAnalyticsResponse.AnalyticsItem
|
||||
2, // 16: slash.api.v2.ShortcutService.ListShortcuts:input_type -> slash.api.v2.ListShortcutsRequest
|
||||
4, // 17: slash.api.v2.ShortcutService.GetShortcut:input_type -> slash.api.v2.GetShortcutRequest
|
||||
6, // 18: slash.api.v2.ShortcutService.GetShortcutById:input_type -> slash.api.v2.GetShortcutByIdRequest
|
||||
6, // 18: slash.api.v2.ShortcutService.GetShortcutByName:input_type -> slash.api.v2.GetShortcutByNameRequest
|
||||
8, // 19: slash.api.v2.ShortcutService.CreateShortcut:input_type -> slash.api.v2.CreateShortcutRequest
|
||||
10, // 20: slash.api.v2.ShortcutService.UpdateShortcut:input_type -> slash.api.v2.UpdateShortcutRequest
|
||||
12, // 21: slash.api.v2.ShortcutService.DeleteShortcut:input_type -> slash.api.v2.DeleteShortcutRequest
|
||||
14, // 22: slash.api.v2.ShortcutService.GetShortcutAnalytics:input_type -> slash.api.v2.GetShortcutAnalyticsRequest
|
||||
3, // 23: slash.api.v2.ShortcutService.ListShortcuts:output_type -> slash.api.v2.ListShortcutsResponse
|
||||
5, // 24: slash.api.v2.ShortcutService.GetShortcut:output_type -> slash.api.v2.GetShortcutResponse
|
||||
7, // 25: slash.api.v2.ShortcutService.GetShortcutById:output_type -> slash.api.v2.GetShortcutByIdResponse
|
||||
7, // 25: slash.api.v2.ShortcutService.GetShortcutByName:output_type -> slash.api.v2.GetShortcutByNameResponse
|
||||
9, // 26: slash.api.v2.ShortcutService.CreateShortcut:output_type -> slash.api.v2.CreateShortcutResponse
|
||||
11, // 27: slash.api.v2.ShortcutService.UpdateShortcut:output_type -> slash.api.v2.UpdateShortcutResponse
|
||||
13, // 28: slash.api.v2.ShortcutService.DeleteShortcut:output_type -> slash.api.v2.DeleteShortcutResponse
|
||||
@ -1313,7 +1313,7 @@ func file_api_v2_shortcut_service_proto_init() {
|
||||
}
|
||||
}
|
||||
file_api_v2_shortcut_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetShortcutByIdRequest); i {
|
||||
switch v := v.(*GetShortcutByNameRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -1325,7 +1325,7 @@ func file_api_v2_shortcut_service_proto_init() {
|
||||
}
|
||||
}
|
||||
file_api_v2_shortcut_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetShortcutByIdResponse); i {
|
||||
switch v := v.(*GetShortcutByNameResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -50,7 +50,7 @@ func local_request_ShortcutService_ListShortcuts_0(ctx context.Context, marshale
|
||||
}
|
||||
|
||||
var (
|
||||
filter_ShortcutService_GetShortcut_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
|
||||
filter_ShortcutService_GetShortcut_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
|
||||
)
|
||||
|
||||
func request_ShortcutService_GetShortcut_0(ctx context.Context, marshaler runtime.Marshaler, client ShortcutServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
@ -64,14 +64,14 @@ func request_ShortcutService_GetShortcut_0(ctx context.Context, marshaler runtim
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
protoReq.Id, err = runtime.Int32(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
@ -97,14 +97,14 @@ func local_request_ShortcutService_GetShortcut_0(ctx context.Context, marshaler
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
protoReq.Id, err = runtime.Int32(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
@ -154,7 +154,7 @@ func local_request_ShortcutService_CreateShortcut_0(ctx context.Context, marshal
|
||||
}
|
||||
|
||||
var (
|
||||
filter_ShortcutService_UpdateShortcut_0 = &utilities.DoubleArray{Encoding: map[string]int{"shortcut": 0, "name": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}}
|
||||
filter_ShortcutService_UpdateShortcut_0 = &utilities.DoubleArray{Encoding: map[string]int{"shortcut": 0, "id": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}}
|
||||
)
|
||||
|
||||
func request_ShortcutService_UpdateShortcut_0(ctx context.Context, marshaler runtime.Marshaler, client ShortcutServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
@ -176,14 +176,14 @@ func request_ShortcutService_UpdateShortcut_0(ctx context.Context, marshaler run
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["shortcut.name"]
|
||||
val, ok = pathParams["shortcut.id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "shortcut.name")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "shortcut.id")
|
||||
}
|
||||
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "shortcut.name", val)
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "shortcut.id", val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "shortcut.name", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "shortcut.id", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
@ -217,14 +217,14 @@ func local_request_ShortcutService_UpdateShortcut_0(ctx context.Context, marshal
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["shortcut.name"]
|
||||
val, ok = pathParams["shortcut.id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "shortcut.name")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "shortcut.id")
|
||||
}
|
||||
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "shortcut.name", val)
|
||||
err = runtime.PopulateFieldFromPath(&protoReq, "shortcut.id", val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "shortcut.name", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "shortcut.id", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
@ -250,14 +250,14 @@ func request_ShortcutService_DeleteShortcut_0(ctx context.Context, marshaler run
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
protoReq.Id, err = runtime.Int32(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := client.DeleteShortcut(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
@ -276,14 +276,14 @@ func local_request_ShortcutService_DeleteShortcut_0(ctx context.Context, marshal
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
protoReq.Id, err = runtime.Int32(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := server.DeleteShortcut(ctx, &protoReq)
|
||||
@ -302,14 +302,14 @@ func request_ShortcutService_GetShortcutAnalytics_0(ctx context.Context, marshal
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
protoReq.Id, err = runtime.Int32(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := client.GetShortcutAnalytics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
@ -328,14 +328,14 @@ func local_request_ShortcutService_GetShortcutAnalytics_0(ctx context.Context, m
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
protoReq.Id, err = runtime.Int32(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := server.GetShortcutAnalytics(ctx, &protoReq)
|
||||
@ -382,7 +382,7 @@ func RegisterShortcutServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.ShortcutService/GetShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{name}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.ShortcutService/GetShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -432,7 +432,7 @@ func RegisterShortcutServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.ShortcutService/UpdateShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{shortcut.name}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.ShortcutService/UpdateShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{shortcut.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -457,7 +457,7 @@ func RegisterShortcutServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.ShortcutService/DeleteShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{name}"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.ShortcutService/DeleteShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -482,7 +482,7 @@ func RegisterShortcutServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.ShortcutService/GetShortcutAnalytics", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{name}/analytics"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.ShortcutService/GetShortcutAnalytics", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{id}/analytics"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -568,7 +568,7 @@ func RegisterShortcutServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.ShortcutService/GetShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{name}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.ShortcutService/GetShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -612,7 +612,7 @@ func RegisterShortcutServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.ShortcutService/UpdateShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{shortcut.name}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.ShortcutService/UpdateShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{shortcut.id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -634,7 +634,7 @@ func RegisterShortcutServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.ShortcutService/DeleteShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{name}"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.ShortcutService/DeleteShortcut", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -656,7 +656,7 @@ func RegisterShortcutServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.ShortcutService/GetShortcutAnalytics", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{name}/analytics"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.ShortcutService/GetShortcutAnalytics", runtime.WithHTTPPathPattern("/api/v2/shortcuts/{id}/analytics"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
@ -678,15 +678,15 @@ func RegisterShortcutServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
var (
|
||||
pattern_ShortcutService_ListShortcuts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "shortcuts"}, ""))
|
||||
|
||||
pattern_ShortcutService_GetShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "shortcuts", "name"}, ""))
|
||||
pattern_ShortcutService_GetShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "shortcuts", "id"}, ""))
|
||||
|
||||
pattern_ShortcutService_CreateShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "shortcuts"}, ""))
|
||||
|
||||
pattern_ShortcutService_UpdateShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "shortcuts", "shortcut.name"}, ""))
|
||||
pattern_ShortcutService_UpdateShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "shortcuts", "shortcut.id"}, ""))
|
||||
|
||||
pattern_ShortcutService_DeleteShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "shortcuts", "name"}, ""))
|
||||
pattern_ShortcutService_DeleteShortcut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "shortcuts", "id"}, ""))
|
||||
|
||||
pattern_ShortcutService_GetShortcutAnalytics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v2", "shortcuts", "name", "analytics"}, ""))
|
||||
pattern_ShortcutService_GetShortcutAnalytics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v2", "shortcuts", "id", "analytics"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -21,7 +21,7 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
const (
|
||||
ShortcutService_ListShortcuts_FullMethodName = "/slash.api.v2.ShortcutService/ListShortcuts"
|
||||
ShortcutService_GetShortcut_FullMethodName = "/slash.api.v2.ShortcutService/GetShortcut"
|
||||
ShortcutService_GetShortcutById_FullMethodName = "/slash.api.v2.ShortcutService/GetShortcutById"
|
||||
ShortcutService_GetShortcutByName_FullMethodName = "/slash.api.v2.ShortcutService/GetShortcutByName"
|
||||
ShortcutService_CreateShortcut_FullMethodName = "/slash.api.v2.ShortcutService/CreateShortcut"
|
||||
ShortcutService_UpdateShortcut_FullMethodName = "/slash.api.v2.ShortcutService/UpdateShortcut"
|
||||
ShortcutService_DeleteShortcut_FullMethodName = "/slash.api.v2.ShortcutService/DeleteShortcut"
|
||||
@ -34,10 +34,10 @@ const (
|
||||
type ShortcutServiceClient interface {
|
||||
// ListShortcuts returns a list of shortcuts.
|
||||
ListShortcuts(ctx context.Context, in *ListShortcutsRequest, opts ...grpc.CallOption) (*ListShortcutsResponse, error)
|
||||
// GetShortcut returns a shortcut by name.
|
||||
// GetShortcut returns a shortcut by id.
|
||||
GetShortcut(ctx context.Context, in *GetShortcutRequest, opts ...grpc.CallOption) (*GetShortcutResponse, error)
|
||||
// GetShortcutById returns a shortcut by id.
|
||||
GetShortcutById(ctx context.Context, in *GetShortcutByIdRequest, opts ...grpc.CallOption) (*GetShortcutByIdResponse, error)
|
||||
// GetShortcutByName returns a shortcut by name.
|
||||
GetShortcutByName(ctx context.Context, in *GetShortcutByNameRequest, opts ...grpc.CallOption) (*GetShortcutByNameResponse, error)
|
||||
// CreateShortcut creates a shortcut.
|
||||
CreateShortcut(ctx context.Context, in *CreateShortcutRequest, opts ...grpc.CallOption) (*CreateShortcutResponse, error)
|
||||
// UpdateShortcut updates a shortcut.
|
||||
@ -74,9 +74,9 @@ func (c *shortcutServiceClient) GetShortcut(ctx context.Context, in *GetShortcut
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *shortcutServiceClient) GetShortcutById(ctx context.Context, in *GetShortcutByIdRequest, opts ...grpc.CallOption) (*GetShortcutByIdResponse, error) {
|
||||
out := new(GetShortcutByIdResponse)
|
||||
err := c.cc.Invoke(ctx, ShortcutService_GetShortcutById_FullMethodName, in, out, opts...)
|
||||
func (c *shortcutServiceClient) GetShortcutByName(ctx context.Context, in *GetShortcutByNameRequest, opts ...grpc.CallOption) (*GetShortcutByNameResponse, error) {
|
||||
out := new(GetShortcutByNameResponse)
|
||||
err := c.cc.Invoke(ctx, ShortcutService_GetShortcutByName_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -125,10 +125,10 @@ func (c *shortcutServiceClient) GetShortcutAnalytics(ctx context.Context, in *Ge
|
||||
type ShortcutServiceServer interface {
|
||||
// ListShortcuts returns a list of shortcuts.
|
||||
ListShortcuts(context.Context, *ListShortcutsRequest) (*ListShortcutsResponse, error)
|
||||
// GetShortcut returns a shortcut by name.
|
||||
// GetShortcut returns a shortcut by id.
|
||||
GetShortcut(context.Context, *GetShortcutRequest) (*GetShortcutResponse, error)
|
||||
// GetShortcutById returns a shortcut by id.
|
||||
GetShortcutById(context.Context, *GetShortcutByIdRequest) (*GetShortcutByIdResponse, error)
|
||||
// GetShortcutByName returns a shortcut by name.
|
||||
GetShortcutByName(context.Context, *GetShortcutByNameRequest) (*GetShortcutByNameResponse, error)
|
||||
// CreateShortcut creates a shortcut.
|
||||
CreateShortcut(context.Context, *CreateShortcutRequest) (*CreateShortcutResponse, error)
|
||||
// UpdateShortcut updates a shortcut.
|
||||
@ -150,8 +150,8 @@ func (UnimplementedShortcutServiceServer) ListShortcuts(context.Context, *ListSh
|
||||
func (UnimplementedShortcutServiceServer) GetShortcut(context.Context, *GetShortcutRequest) (*GetShortcutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetShortcut not implemented")
|
||||
}
|
||||
func (UnimplementedShortcutServiceServer) GetShortcutById(context.Context, *GetShortcutByIdRequest) (*GetShortcutByIdResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetShortcutById not implemented")
|
||||
func (UnimplementedShortcutServiceServer) GetShortcutByName(context.Context, *GetShortcutByNameRequest) (*GetShortcutByNameResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetShortcutByName not implemented")
|
||||
}
|
||||
func (UnimplementedShortcutServiceServer) CreateShortcut(context.Context, *CreateShortcutRequest) (*CreateShortcutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateShortcut not implemented")
|
||||
@ -214,20 +214,20 @@ func _ShortcutService_GetShortcut_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ShortcutService_GetShortcutById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetShortcutByIdRequest)
|
||||
func _ShortcutService_GetShortcutByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetShortcutByNameRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ShortcutServiceServer).GetShortcutById(ctx, in)
|
||||
return srv.(ShortcutServiceServer).GetShortcutByName(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ShortcutService_GetShortcutById_FullMethodName,
|
||||
FullMethod: ShortcutService_GetShortcutByName_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ShortcutServiceServer).GetShortcutById(ctx, req.(*GetShortcutByIdRequest))
|
||||
return srv.(ShortcutServiceServer).GetShortcutByName(ctx, req.(*GetShortcutByNameRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@ -320,8 +320,8 @@ var ShortcutService_ServiceDesc = grpc.ServiceDesc{
|
||||
Handler: _ShortcutService_GetShortcut_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetShortcutById",
|
||||
Handler: _ShortcutService_GetShortcutById_Handler,
|
||||
MethodName: "GetShortcutByName",
|
||||
Handler: _ShortcutService_GetShortcutByName_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateShortcut",
|
||||
|
@ -77,8 +77,8 @@ func (d *DB) UpdateShortcut(ctx context.Context, update *store.UpdateShortcut) (
|
||||
if len(set) == 0 {
|
||||
return nil, errors.New("no update specified")
|
||||
}
|
||||
args = append(args, update.ID)
|
||||
|
||||
args = append(args, update.ID)
|
||||
stmt := fmt.Sprintf(`
|
||||
UPDATE shortcut
|
||||
SET %s
|
||||
|
Loading…
x
Reference in New Issue
Block a user