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