mirror of
https://github.com/usememos/memos.git
synced 2026-11-19 10:29:11 +01:00
1492 lines
67 KiB
Go
1492 lines
67 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc (unknown)
|
|
// source: api/user_service.proto
|
|
|
|
package api
|
|
|
|
import (
|
|
context "context"
|
|
httpbody "google.golang.org/genproto/googleapis/api/httpbody"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
UserService_ListUsers_FullMethodName = "/memos.api.UserService/ListUsers"
|
|
UserService_GetUser_FullMethodName = "/memos.api.UserService/GetUser"
|
|
UserService_BatchGetUsers_FullMethodName = "/memos.api.UserService/BatchGetUsers"
|
|
UserService_CreateUser_FullMethodName = "/memos.api.UserService/CreateUser"
|
|
UserService_UpdateUser_FullMethodName = "/memos.api.UserService/UpdateUser"
|
|
UserService_DeleteUser_FullMethodName = "/memos.api.UserService/DeleteUser"
|
|
UserService_ListUserSettings_FullMethodName = "/memos.api.UserService/ListUserSettings"
|
|
UserService_GetUserSetting_FullMethodName = "/memos.api.UserService/GetUserSetting"
|
|
UserService_UpdateUserSetting_FullMethodName = "/memos.api.UserService/UpdateUserSetting"
|
|
UserService_ListUserStats_FullMethodName = "/memos.api.UserService/ListUserStats"
|
|
UserService_GetUserStats_FullMethodName = "/memos.api.UserService/GetUserStats"
|
|
UserService_ListMemoViews_FullMethodName = "/memos.api.UserService/ListMemoViews"
|
|
UserService_GetMemoView_FullMethodName = "/memos.api.UserService/GetMemoView"
|
|
UserService_CreateMemoView_FullMethodName = "/memos.api.UserService/CreateMemoView"
|
|
UserService_UpdateMemoView_FullMethodName = "/memos.api.UserService/UpdateMemoView"
|
|
UserService_DeleteMemoView_FullMethodName = "/memos.api.UserService/DeleteMemoView"
|
|
UserService_ListUserNotifications_FullMethodName = "/memos.api.UserService/ListUserNotifications"
|
|
UserService_UpdateUserNotification_FullMethodName = "/memos.api.UserService/UpdateUserNotification"
|
|
UserService_DeleteUserNotification_FullMethodName = "/memos.api.UserService/DeleteUserNotification"
|
|
UserService_ListUserWebhooks_FullMethodName = "/memos.api.UserService/ListUserWebhooks"
|
|
UserService_CreateUserWebhook_FullMethodName = "/memos.api.UserService/CreateUserWebhook"
|
|
UserService_UpdateUserWebhook_FullMethodName = "/memos.api.UserService/UpdateUserWebhook"
|
|
UserService_DeleteUserWebhook_FullMethodName = "/memos.api.UserService/DeleteUserWebhook"
|
|
UserService_GetUserWebhookSigningSecret_FullMethodName = "/memos.api.UserService/GetUserWebhookSigningSecret"
|
|
UserService_ListLinkedIdentities_FullMethodName = "/memos.api.UserService/ListLinkedIdentities"
|
|
UserService_GetLinkedIdentity_FullMethodName = "/memos.api.UserService/GetLinkedIdentity"
|
|
UserService_CreateLinkedIdentity_FullMethodName = "/memos.api.UserService/CreateLinkedIdentity"
|
|
UserService_DeleteLinkedIdentity_FullMethodName = "/memos.api.UserService/DeleteLinkedIdentity"
|
|
UserService_ListPersonalAccessTokens_FullMethodName = "/memos.api.UserService/ListPersonalAccessTokens"
|
|
UserService_CreatePersonalAccessToken_FullMethodName = "/memos.api.UserService/CreatePersonalAccessToken"
|
|
UserService_DeletePersonalAccessToken_FullMethodName = "/memos.api.UserService/DeletePersonalAccessToken"
|
|
UserService_ExportMemos_FullMethodName = "/memos.api.UserService/ExportMemos"
|
|
UserService_ImportMemos_FullMethodName = "/memos.api.UserService/ImportMemos"
|
|
)
|
|
|
|
// UserServiceClient is the client API for UserService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
//
|
|
// UserService manages users and the resources they own: settings, statistics,
|
|
// memo views, notifications, webhooks, linked identities, personal access
|
|
// tokens, and memo export files.
|
|
type UserServiceClient interface {
|
|
// ListUsers lists users in every state. Only admins may call it.
|
|
ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
|
|
// GetUser gets a user by resource name.
|
|
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error)
|
|
// BatchGetUsers gets active users by username. Usernames that match no
|
|
// active user are omitted from the response.
|
|
BatchGetUsers(ctx context.Context, in *BatchGetUsersRequest, opts ...grpc.CallOption) (*BatchGetUsersResponse, error)
|
|
// CreateUser creates a user. The first user of an instance becomes an admin.
|
|
// Otherwise, unless an admin calls it, the instance must allow user
|
|
// registration and password sign-up, and the new user gets the USER role.
|
|
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error)
|
|
// UpdateUser updates a user. Users may update themselves; admins may update
|
|
// anyone. Changing the password ends the user's other sessions.
|
|
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error)
|
|
// DeleteUser deletes a user. Users may delete themselves; admins may delete
|
|
// anyone. A user who belongs to any space cannot be deleted.
|
|
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// ListUserSettings lists the settings of a user. Only the user may call it.
|
|
// The GENERAL setting is always included, with defaults when it was never
|
|
// saved.
|
|
ListUserSettings(ctx context.Context, in *ListUserSettingsRequest, opts ...grpc.CallOption) (*ListUserSettingsResponse, error)
|
|
// GetUserSetting gets a user setting. Only the user may call it.
|
|
GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error)
|
|
// UpdateUserSetting updates a user setting. Only the user may call it, and
|
|
// only the GENERAL and TAGS settings can be updated.
|
|
UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error)
|
|
// ListUserStats returns memo statistics for every user who created at least
|
|
// one matching memo the caller can read. Use the parent users/- for all
|
|
// users, or users/{user} for one user.
|
|
ListUserStats(ctx context.Context, in *ListUserStatsRequest, opts ...grpc.CallOption) (*ListUserStatsResponse, error)
|
|
// GetUserStats returns memo statistics for one user, counting the user's
|
|
// memos that the caller can read.
|
|
GetUserStats(ctx context.Context, in *GetUserStatsRequest, opts ...grpc.CallOption) (*UserStats, error)
|
|
// ListMemoViews lists a user's memo views. Each view is a named, reusable
|
|
// CEL filter (see MemoView.filter); pass its filter string directly to the
|
|
// ListMemos `filter` argument. Only the user may call it.
|
|
ListMemoViews(ctx context.Context, in *ListMemoViewsRequest, opts ...grpc.CallOption) (*ListMemoViewsResponse, error)
|
|
// GetMemoView gets a memo view. Only the owner may call it.
|
|
GetMemoView(ctx context.Context, in *GetMemoViewRequest, opts ...grpc.CallOption) (*MemoView, error)
|
|
// CreateMemoView creates a memo view for a user. Only the user may call it.
|
|
CreateMemoView(ctx context.Context, in *CreateMemoViewRequest, opts ...grpc.CallOption) (*MemoView, error)
|
|
// UpdateMemoView updates a memo view. Only the owner may call it.
|
|
UpdateMemoView(ctx context.Context, in *UpdateMemoViewRequest, opts ...grpc.CallOption) (*MemoView, error)
|
|
// DeleteMemoView deletes a memo view. Only the owner may call it.
|
|
DeleteMemoView(ctx context.Context, in *DeleteMemoViewRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// ListUserNotifications lists a user's notifications. Only the user may call
|
|
// it. Notifications whose memos or space invitation the user can no longer
|
|
// read are left out.
|
|
ListUserNotifications(ctx context.Context, in *ListUserNotificationsRequest, opts ...grpc.CallOption) (*ListUserNotificationsResponse, error)
|
|
// UpdateUserNotification updates a notification's status. Only the receiver
|
|
// may call it.
|
|
UpdateUserNotification(ctx context.Context, in *UpdateUserNotificationRequest, opts ...grpc.CallOption) (*UserNotification, error)
|
|
// DeleteUserNotification permanently deletes a notification. Only the
|
|
// receiver may call it.
|
|
DeleteUserNotification(ctx context.Context, in *DeleteUserNotificationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// ListUserWebhooks lists a user's webhooks. Only the user may call it.
|
|
ListUserWebhooks(ctx context.Context, in *ListUserWebhooksRequest, opts ...grpc.CallOption) (*ListUserWebhooksResponse, error)
|
|
// CreateUserWebhook creates a webhook for a user. Only the user may call it.
|
|
// The service generates a signing secret when none is given.
|
|
CreateUserWebhook(ctx context.Context, in *CreateUserWebhookRequest, opts ...grpc.CallOption) (*UserWebhook, error)
|
|
// UpdateUserWebhook updates a webhook. Only the owner may call it.
|
|
UpdateUserWebhook(ctx context.Context, in *UpdateUserWebhookRequest, opts ...grpc.CallOption) (*UserWebhook, error)
|
|
// DeleteUserWebhook deletes a webhook. Only the owner may call it.
|
|
DeleteUserWebhook(ctx context.Context, in *DeleteUserWebhookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// GetUserWebhookSigningSecret returns the signing secret of a webhook. Only
|
|
// the owner may call it. The secret is returned only through this call; it
|
|
// is never included in List, Create or Update responses.
|
|
GetUserWebhookSigningSecret(ctx context.Context, in *GetUserWebhookSigningSecretRequest, opts ...grpc.CallOption) (*GetUserWebhookSigningSecretResponse, error)
|
|
// ListLinkedIdentities lists the SSO identities linked to a user. The user
|
|
// and admins may call it.
|
|
ListLinkedIdentities(ctx context.Context, in *ListLinkedIdentitiesRequest, opts ...grpc.CallOption) (*ListLinkedIdentitiesResponse, error)
|
|
// GetLinkedIdentity gets an SSO identity linked to a user. The user and
|
|
// admins may call it.
|
|
GetLinkedIdentity(ctx context.Context, in *GetLinkedIdentityRequest, opts ...grpc.CallOption) (*LinkedIdentity, error)
|
|
// CreateLinkedIdentity completes an OAuth flow and links the resulting SSO
|
|
// identity to the authenticated user, who must be the parent.
|
|
CreateLinkedIdentity(ctx context.Context, in *CreateLinkedIdentityRequest, opts ...grpc.CallOption) (*LinkedIdentity, error)
|
|
// DeleteLinkedIdentity unlinks an SSO identity from a user. The user and
|
|
// admins may call it.
|
|
DeleteLinkedIdentity(ctx context.Context, in *DeleteLinkedIdentityRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// ListPersonalAccessTokens lists a user's personal access tokens (PATs),
|
|
// without their token values. PATs are long-lived tokens for API and script
|
|
// access, distinct from short-lived JWT access tokens. The user and admins
|
|
// may call it.
|
|
ListPersonalAccessTokens(ctx context.Context, in *ListPersonalAccessTokensRequest, opts ...grpc.CallOption) (*ListPersonalAccessTokensResponse, error)
|
|
// CreatePersonalAccessToken creates a personal access token for a user.
|
|
// Only the user may call it. The token value is returned only once, in the
|
|
// response.
|
|
CreatePersonalAccessToken(ctx context.Context, in *CreatePersonalAccessTokenRequest, opts ...grpc.CallOption) (*CreatePersonalAccessTokenResponse, error)
|
|
// DeletePersonalAccessToken deletes a personal access token, which stops
|
|
// working immediately. Only the owner may call it.
|
|
DeletePersonalAccessToken(ctx context.Context, in *DeletePersonalAccessTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// ExportMemos writes every memo the user created, with comments, archived
|
|
// memos, and attachment files, as a Memos export file (a ZIP file, see
|
|
// docs/design/memos-export-format.md). Only the user may export their own
|
|
// memos. The body is the archive; content_type is its media type.
|
|
ExportMemos(ctx context.Context, in *ExportMemosRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error)
|
|
// ImportMemos uploads a Memos export file in bounded chunks and imports it
|
|
// into the user's memos. The first call carries the spec and returns an
|
|
// upload_id; later calls carry that upload_id. A finishing call with
|
|
// validate_only returns the plan and keeps the archive staged; a finishing
|
|
// call without it imports and returns the report. Uploads are bound to the
|
|
// authenticated user, expire after 30 minutes of inactivity, and do not
|
|
// survive a server restart.
|
|
ImportMemos(ctx context.Context, in *ImportMemosRequest, opts ...grpc.CallOption) (*ImportMemosResponse, error)
|
|
}
|
|
|
|
type userServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
|
|
return &userServiceClient{cc}
|
|
}
|
|
|
|
func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListUsersResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ListUsers_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(User)
|
|
err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) BatchGetUsers(ctx context.Context, in *BatchGetUsersRequest, opts ...grpc.CallOption) (*BatchGetUsersResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(BatchGetUsersResponse)
|
|
err := c.cc.Invoke(ctx, UserService_BatchGetUsers_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(User)
|
|
err := c.cc.Invoke(ctx, UserService_CreateUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(User)
|
|
err := c.cc.Invoke(ctx, UserService_UpdateUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, UserService_DeleteUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ListUserSettings(ctx context.Context, in *ListUserSettingsRequest, opts ...grpc.CallOption) (*ListUserSettingsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListUserSettingsResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ListUserSettings_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserSetting)
|
|
err := c.cc.Invoke(ctx, UserService_GetUserSetting_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserSetting)
|
|
err := c.cc.Invoke(ctx, UserService_UpdateUserSetting_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ListUserStats(ctx context.Context, in *ListUserStatsRequest, opts ...grpc.CallOption) (*ListUserStatsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListUserStatsResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ListUserStats_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetUserStats(ctx context.Context, in *GetUserStatsRequest, opts ...grpc.CallOption) (*UserStats, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserStats)
|
|
err := c.cc.Invoke(ctx, UserService_GetUserStats_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ListMemoViews(ctx context.Context, in *ListMemoViewsRequest, opts ...grpc.CallOption) (*ListMemoViewsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListMemoViewsResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ListMemoViews_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetMemoView(ctx context.Context, in *GetMemoViewRequest, opts ...grpc.CallOption) (*MemoView, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(MemoView)
|
|
err := c.cc.Invoke(ctx, UserService_GetMemoView_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) CreateMemoView(ctx context.Context, in *CreateMemoViewRequest, opts ...grpc.CallOption) (*MemoView, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(MemoView)
|
|
err := c.cc.Invoke(ctx, UserService_CreateMemoView_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) UpdateMemoView(ctx context.Context, in *UpdateMemoViewRequest, opts ...grpc.CallOption) (*MemoView, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(MemoView)
|
|
err := c.cc.Invoke(ctx, UserService_UpdateMemoView_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) DeleteMemoView(ctx context.Context, in *DeleteMemoViewRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, UserService_DeleteMemoView_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ListUserNotifications(ctx context.Context, in *ListUserNotificationsRequest, opts ...grpc.CallOption) (*ListUserNotificationsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListUserNotificationsResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ListUserNotifications_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) UpdateUserNotification(ctx context.Context, in *UpdateUserNotificationRequest, opts ...grpc.CallOption) (*UserNotification, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserNotification)
|
|
err := c.cc.Invoke(ctx, UserService_UpdateUserNotification_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) DeleteUserNotification(ctx context.Context, in *DeleteUserNotificationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, UserService_DeleteUserNotification_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ListUserWebhooks(ctx context.Context, in *ListUserWebhooksRequest, opts ...grpc.CallOption) (*ListUserWebhooksResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListUserWebhooksResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ListUserWebhooks_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) CreateUserWebhook(ctx context.Context, in *CreateUserWebhookRequest, opts ...grpc.CallOption) (*UserWebhook, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserWebhook)
|
|
err := c.cc.Invoke(ctx, UserService_CreateUserWebhook_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) UpdateUserWebhook(ctx context.Context, in *UpdateUserWebhookRequest, opts ...grpc.CallOption) (*UserWebhook, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UserWebhook)
|
|
err := c.cc.Invoke(ctx, UserService_UpdateUserWebhook_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) DeleteUserWebhook(ctx context.Context, in *DeleteUserWebhookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, UserService_DeleteUserWebhook_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetUserWebhookSigningSecret(ctx context.Context, in *GetUserWebhookSigningSecretRequest, opts ...grpc.CallOption) (*GetUserWebhookSigningSecretResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetUserWebhookSigningSecretResponse)
|
|
err := c.cc.Invoke(ctx, UserService_GetUserWebhookSigningSecret_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ListLinkedIdentities(ctx context.Context, in *ListLinkedIdentitiesRequest, opts ...grpc.CallOption) (*ListLinkedIdentitiesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListLinkedIdentitiesResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ListLinkedIdentities_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) GetLinkedIdentity(ctx context.Context, in *GetLinkedIdentityRequest, opts ...grpc.CallOption) (*LinkedIdentity, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(LinkedIdentity)
|
|
err := c.cc.Invoke(ctx, UserService_GetLinkedIdentity_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) CreateLinkedIdentity(ctx context.Context, in *CreateLinkedIdentityRequest, opts ...grpc.CallOption) (*LinkedIdentity, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(LinkedIdentity)
|
|
err := c.cc.Invoke(ctx, UserService_CreateLinkedIdentity_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) DeleteLinkedIdentity(ctx context.Context, in *DeleteLinkedIdentityRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, UserService_DeleteLinkedIdentity_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ListPersonalAccessTokens(ctx context.Context, in *ListPersonalAccessTokensRequest, opts ...grpc.CallOption) (*ListPersonalAccessTokensResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListPersonalAccessTokensResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ListPersonalAccessTokens_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) CreatePersonalAccessToken(ctx context.Context, in *CreatePersonalAccessTokenRequest, opts ...grpc.CallOption) (*CreatePersonalAccessTokenResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CreatePersonalAccessTokenResponse)
|
|
err := c.cc.Invoke(ctx, UserService_CreatePersonalAccessToken_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) DeletePersonalAccessToken(ctx context.Context, in *DeletePersonalAccessTokenRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, UserService_DeletePersonalAccessToken_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ExportMemos(ctx context.Context, in *ExportMemosRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(httpbody.HttpBody)
|
|
err := c.cc.Invoke(ctx, UserService_ExportMemos_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userServiceClient) ImportMemos(ctx context.Context, in *ImportMemosRequest, opts ...grpc.CallOption) (*ImportMemosResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ImportMemosResponse)
|
|
err := c.cc.Invoke(ctx, UserService_ImportMemos_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// UserServiceServer is the server API for UserService service.
|
|
// All implementations must embed UnimplementedUserServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// UserService manages users and the resources they own: settings, statistics,
|
|
// memo views, notifications, webhooks, linked identities, personal access
|
|
// tokens, and memo export files.
|
|
type UserServiceServer interface {
|
|
// ListUsers lists users in every state. Only admins may call it.
|
|
ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
|
|
// GetUser gets a user by resource name.
|
|
GetUser(context.Context, *GetUserRequest) (*User, error)
|
|
// BatchGetUsers gets active users by username. Usernames that match no
|
|
// active user are omitted from the response.
|
|
BatchGetUsers(context.Context, *BatchGetUsersRequest) (*BatchGetUsersResponse, error)
|
|
// CreateUser creates a user. The first user of an instance becomes an admin.
|
|
// Otherwise, unless an admin calls it, the instance must allow user
|
|
// registration and password sign-up, and the new user gets the USER role.
|
|
CreateUser(context.Context, *CreateUserRequest) (*User, error)
|
|
// UpdateUser updates a user. Users may update themselves; admins may update
|
|
// anyone. Changing the password ends the user's other sessions.
|
|
UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
|
|
// DeleteUser deletes a user. Users may delete themselves; admins may delete
|
|
// anyone. A user who belongs to any space cannot be deleted.
|
|
DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
|
|
// ListUserSettings lists the settings of a user. Only the user may call it.
|
|
// The GENERAL setting is always included, with defaults when it was never
|
|
// saved.
|
|
ListUserSettings(context.Context, *ListUserSettingsRequest) (*ListUserSettingsResponse, error)
|
|
// GetUserSetting gets a user setting. Only the user may call it.
|
|
GetUserSetting(context.Context, *GetUserSettingRequest) (*UserSetting, error)
|
|
// UpdateUserSetting updates a user setting. Only the user may call it, and
|
|
// only the GENERAL and TAGS settings can be updated.
|
|
UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UserSetting, error)
|
|
// ListUserStats returns memo statistics for every user who created at least
|
|
// one matching memo the caller can read. Use the parent users/- for all
|
|
// users, or users/{user} for one user.
|
|
ListUserStats(context.Context, *ListUserStatsRequest) (*ListUserStatsResponse, error)
|
|
// GetUserStats returns memo statistics for one user, counting the user's
|
|
// memos that the caller can read.
|
|
GetUserStats(context.Context, *GetUserStatsRequest) (*UserStats, error)
|
|
// ListMemoViews lists a user's memo views. Each view is a named, reusable
|
|
// CEL filter (see MemoView.filter); pass its filter string directly to the
|
|
// ListMemos `filter` argument. Only the user may call it.
|
|
ListMemoViews(context.Context, *ListMemoViewsRequest) (*ListMemoViewsResponse, error)
|
|
// GetMemoView gets a memo view. Only the owner may call it.
|
|
GetMemoView(context.Context, *GetMemoViewRequest) (*MemoView, error)
|
|
// CreateMemoView creates a memo view for a user. Only the user may call it.
|
|
CreateMemoView(context.Context, *CreateMemoViewRequest) (*MemoView, error)
|
|
// UpdateMemoView updates a memo view. Only the owner may call it.
|
|
UpdateMemoView(context.Context, *UpdateMemoViewRequest) (*MemoView, error)
|
|
// DeleteMemoView deletes a memo view. Only the owner may call it.
|
|
DeleteMemoView(context.Context, *DeleteMemoViewRequest) (*emptypb.Empty, error)
|
|
// ListUserNotifications lists a user's notifications. Only the user may call
|
|
// it. Notifications whose memos or space invitation the user can no longer
|
|
// read are left out.
|
|
ListUserNotifications(context.Context, *ListUserNotificationsRequest) (*ListUserNotificationsResponse, error)
|
|
// UpdateUserNotification updates a notification's status. Only the receiver
|
|
// may call it.
|
|
UpdateUserNotification(context.Context, *UpdateUserNotificationRequest) (*UserNotification, error)
|
|
// DeleteUserNotification permanently deletes a notification. Only the
|
|
// receiver may call it.
|
|
DeleteUserNotification(context.Context, *DeleteUserNotificationRequest) (*emptypb.Empty, error)
|
|
// ListUserWebhooks lists a user's webhooks. Only the user may call it.
|
|
ListUserWebhooks(context.Context, *ListUserWebhooksRequest) (*ListUserWebhooksResponse, error)
|
|
// CreateUserWebhook creates a webhook for a user. Only the user may call it.
|
|
// The service generates a signing secret when none is given.
|
|
CreateUserWebhook(context.Context, *CreateUserWebhookRequest) (*UserWebhook, error)
|
|
// UpdateUserWebhook updates a webhook. Only the owner may call it.
|
|
UpdateUserWebhook(context.Context, *UpdateUserWebhookRequest) (*UserWebhook, error)
|
|
// DeleteUserWebhook deletes a webhook. Only the owner may call it.
|
|
DeleteUserWebhook(context.Context, *DeleteUserWebhookRequest) (*emptypb.Empty, error)
|
|
// GetUserWebhookSigningSecret returns the signing secret of a webhook. Only
|
|
// the owner may call it. The secret is returned only through this call; it
|
|
// is never included in List, Create or Update responses.
|
|
GetUserWebhookSigningSecret(context.Context, *GetUserWebhookSigningSecretRequest) (*GetUserWebhookSigningSecretResponse, error)
|
|
// ListLinkedIdentities lists the SSO identities linked to a user. The user
|
|
// and admins may call it.
|
|
ListLinkedIdentities(context.Context, *ListLinkedIdentitiesRequest) (*ListLinkedIdentitiesResponse, error)
|
|
// GetLinkedIdentity gets an SSO identity linked to a user. The user and
|
|
// admins may call it.
|
|
GetLinkedIdentity(context.Context, *GetLinkedIdentityRequest) (*LinkedIdentity, error)
|
|
// CreateLinkedIdentity completes an OAuth flow and links the resulting SSO
|
|
// identity to the authenticated user, who must be the parent.
|
|
CreateLinkedIdentity(context.Context, *CreateLinkedIdentityRequest) (*LinkedIdentity, error)
|
|
// DeleteLinkedIdentity unlinks an SSO identity from a user. The user and
|
|
// admins may call it.
|
|
DeleteLinkedIdentity(context.Context, *DeleteLinkedIdentityRequest) (*emptypb.Empty, error)
|
|
// ListPersonalAccessTokens lists a user's personal access tokens (PATs),
|
|
// without their token values. PATs are long-lived tokens for API and script
|
|
// access, distinct from short-lived JWT access tokens. The user and admins
|
|
// may call it.
|
|
ListPersonalAccessTokens(context.Context, *ListPersonalAccessTokensRequest) (*ListPersonalAccessTokensResponse, error)
|
|
// CreatePersonalAccessToken creates a personal access token for a user.
|
|
// Only the user may call it. The token value is returned only once, in the
|
|
// response.
|
|
CreatePersonalAccessToken(context.Context, *CreatePersonalAccessTokenRequest) (*CreatePersonalAccessTokenResponse, error)
|
|
// DeletePersonalAccessToken deletes a personal access token, which stops
|
|
// working immediately. Only the owner may call it.
|
|
DeletePersonalAccessToken(context.Context, *DeletePersonalAccessTokenRequest) (*emptypb.Empty, error)
|
|
// ExportMemos writes every memo the user created, with comments, archived
|
|
// memos, and attachment files, as a Memos export file (a ZIP file, see
|
|
// docs/design/memos-export-format.md). Only the user may export their own
|
|
// memos. The body is the archive; content_type is its media type.
|
|
ExportMemos(context.Context, *ExportMemosRequest) (*httpbody.HttpBody, error)
|
|
// ImportMemos uploads a Memos export file in bounded chunks and imports it
|
|
// into the user's memos. The first call carries the spec and returns an
|
|
// upload_id; later calls carry that upload_id. A finishing call with
|
|
// validate_only returns the plan and keeps the archive staged; a finishing
|
|
// call without it imports and returns the report. Uploads are bound to the
|
|
// authenticated user, expire after 30 minutes of inactivity, and do not
|
|
// survive a server restart.
|
|
ImportMemos(context.Context, *ImportMemosRequest) (*ImportMemosResponse, error)
|
|
mustEmbedUnimplementedUserServiceServer()
|
|
}
|
|
|
|
// UnimplementedUserServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedUserServiceServer struct{}
|
|
|
|
func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListUsers not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetUser not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) BatchGetUsers(context.Context, *BatchGetUsersRequest) (*BatchGetUsersResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method BatchGetUsers not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*User, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CreateUser not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateUser not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteUser not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ListUserSettings(context.Context, *ListUserSettingsRequest) (*ListUserSettingsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListUserSettings not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetUserSetting(context.Context, *GetUserSettingRequest) (*UserSetting, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetUserSetting not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UserSetting, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateUserSetting not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ListUserStats(context.Context, *ListUserStatsRequest) (*ListUserStatsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListUserStats not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetUserStats(context.Context, *GetUserStatsRequest) (*UserStats, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetUserStats not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ListMemoViews(context.Context, *ListMemoViewsRequest) (*ListMemoViewsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListMemoViews not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetMemoView(context.Context, *GetMemoViewRequest) (*MemoView, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetMemoView not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) CreateMemoView(context.Context, *CreateMemoViewRequest) (*MemoView, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CreateMemoView not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) UpdateMemoView(context.Context, *UpdateMemoViewRequest) (*MemoView, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateMemoView not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) DeleteMemoView(context.Context, *DeleteMemoViewRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteMemoView not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ListUserNotifications(context.Context, *ListUserNotificationsRequest) (*ListUserNotificationsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListUserNotifications not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) UpdateUserNotification(context.Context, *UpdateUserNotificationRequest) (*UserNotification, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateUserNotification not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) DeleteUserNotification(context.Context, *DeleteUserNotificationRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteUserNotification not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ListUserWebhooks(context.Context, *ListUserWebhooksRequest) (*ListUserWebhooksResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListUserWebhooks not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) CreateUserWebhook(context.Context, *CreateUserWebhookRequest) (*UserWebhook, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CreateUserWebhook not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) UpdateUserWebhook(context.Context, *UpdateUserWebhookRequest) (*UserWebhook, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateUserWebhook not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) DeleteUserWebhook(context.Context, *DeleteUserWebhookRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteUserWebhook not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetUserWebhookSigningSecret(context.Context, *GetUserWebhookSigningSecretRequest) (*GetUserWebhookSigningSecretResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetUserWebhookSigningSecret not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ListLinkedIdentities(context.Context, *ListLinkedIdentitiesRequest) (*ListLinkedIdentitiesResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListLinkedIdentities not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) GetLinkedIdentity(context.Context, *GetLinkedIdentityRequest) (*LinkedIdentity, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetLinkedIdentity not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) CreateLinkedIdentity(context.Context, *CreateLinkedIdentityRequest) (*LinkedIdentity, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CreateLinkedIdentity not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) DeleteLinkedIdentity(context.Context, *DeleteLinkedIdentityRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteLinkedIdentity not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ListPersonalAccessTokens(context.Context, *ListPersonalAccessTokensRequest) (*ListPersonalAccessTokensResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListPersonalAccessTokens not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) CreatePersonalAccessToken(context.Context, *CreatePersonalAccessTokenRequest) (*CreatePersonalAccessTokenResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CreatePersonalAccessToken not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) DeletePersonalAccessToken(context.Context, *DeletePersonalAccessTokenRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeletePersonalAccessToken not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ExportMemos(context.Context, *ExportMemosRequest) (*httpbody.HttpBody, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ExportMemos not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) ImportMemos(context.Context, *ImportMemosRequest) (*ImportMemosResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ImportMemos not implemented")
|
|
}
|
|
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
|
|
func (UnimplementedUserServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to UserServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeUserServiceServer interface {
|
|
mustEmbedUnimplementedUserServiceServer()
|
|
}
|
|
|
|
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedUserServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&UserService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _UserService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListUsersRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ListUsers(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ListUsers_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ListUsers(ctx, req.(*ListUsersRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_BatchGetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BatchGetUsersRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).BatchGetUsers(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_BatchGetUsers_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).BatchGetUsers(ctx, req.(*BatchGetUsersRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateUserRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).CreateUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_CreateUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).CreateUser(ctx, req.(*CreateUserRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateUserRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).UpdateUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_UpdateUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).UpdateUser(ctx, req.(*UpdateUserRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteUserRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).DeleteUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_DeleteUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).DeleteUser(ctx, req.(*DeleteUserRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ListUserSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListUserSettingsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ListUserSettings(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ListUserSettings_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ListUserSettings(ctx, req.(*ListUserSettingsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetUserSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserSettingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetUserSetting(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetUserSetting_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetUserSetting(ctx, req.(*GetUserSettingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_UpdateUserSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateUserSettingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).UpdateUserSetting(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_UpdateUserSetting_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).UpdateUserSetting(ctx, req.(*UpdateUserSettingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ListUserStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListUserStatsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ListUserStats(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ListUserStats_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ListUserStats(ctx, req.(*ListUserStatsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetUserStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserStatsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetUserStats(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetUserStats_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetUserStats(ctx, req.(*GetUserStatsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ListMemoViews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListMemoViewsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ListMemoViews(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ListMemoViews_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ListMemoViews(ctx, req.(*ListMemoViewsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetMemoView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetMemoViewRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetMemoView(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetMemoView_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetMemoView(ctx, req.(*GetMemoViewRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_CreateMemoView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateMemoViewRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).CreateMemoView(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_CreateMemoView_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).CreateMemoView(ctx, req.(*CreateMemoViewRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_UpdateMemoView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateMemoViewRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).UpdateMemoView(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_UpdateMemoView_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).UpdateMemoView(ctx, req.(*UpdateMemoViewRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_DeleteMemoView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteMemoViewRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).DeleteMemoView(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_DeleteMemoView_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).DeleteMemoView(ctx, req.(*DeleteMemoViewRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ListUserNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListUserNotificationsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ListUserNotifications(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ListUserNotifications_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ListUserNotifications(ctx, req.(*ListUserNotificationsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_UpdateUserNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateUserNotificationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).UpdateUserNotification(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_UpdateUserNotification_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).UpdateUserNotification(ctx, req.(*UpdateUserNotificationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_DeleteUserNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteUserNotificationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).DeleteUserNotification(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_DeleteUserNotification_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).DeleteUserNotification(ctx, req.(*DeleteUserNotificationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ListUserWebhooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListUserWebhooksRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ListUserWebhooks(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ListUserWebhooks_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ListUserWebhooks(ctx, req.(*ListUserWebhooksRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_CreateUserWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateUserWebhookRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).CreateUserWebhook(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_CreateUserWebhook_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).CreateUserWebhook(ctx, req.(*CreateUserWebhookRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_UpdateUserWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateUserWebhookRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).UpdateUserWebhook(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_UpdateUserWebhook_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).UpdateUserWebhook(ctx, req.(*UpdateUserWebhookRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_DeleteUserWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteUserWebhookRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).DeleteUserWebhook(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_DeleteUserWebhook_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).DeleteUserWebhook(ctx, req.(*DeleteUserWebhookRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetUserWebhookSigningSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUserWebhookSigningSecretRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetUserWebhookSigningSecret(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetUserWebhookSigningSecret_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetUserWebhookSigningSecret(ctx, req.(*GetUserWebhookSigningSecretRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ListLinkedIdentities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListLinkedIdentitiesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ListLinkedIdentities(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ListLinkedIdentities_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ListLinkedIdentities(ctx, req.(*ListLinkedIdentitiesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_GetLinkedIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetLinkedIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).GetLinkedIdentity(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_GetLinkedIdentity_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).GetLinkedIdentity(ctx, req.(*GetLinkedIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_CreateLinkedIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateLinkedIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).CreateLinkedIdentity(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_CreateLinkedIdentity_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).CreateLinkedIdentity(ctx, req.(*CreateLinkedIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_DeleteLinkedIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteLinkedIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).DeleteLinkedIdentity(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_DeleteLinkedIdentity_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).DeleteLinkedIdentity(ctx, req.(*DeleteLinkedIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ListPersonalAccessTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListPersonalAccessTokensRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ListPersonalAccessTokens(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ListPersonalAccessTokens_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ListPersonalAccessTokens(ctx, req.(*ListPersonalAccessTokensRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_CreatePersonalAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreatePersonalAccessTokenRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).CreatePersonalAccessToken(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_CreatePersonalAccessToken_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).CreatePersonalAccessToken(ctx, req.(*CreatePersonalAccessTokenRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_DeletePersonalAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeletePersonalAccessTokenRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).DeletePersonalAccessToken(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_DeletePersonalAccessToken_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).DeletePersonalAccessToken(ctx, req.(*DeletePersonalAccessTokenRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ExportMemos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ExportMemosRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ExportMemos(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ExportMemos_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ExportMemos(ctx, req.(*ExportMemosRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _UserService_ImportMemos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ImportMemosRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServiceServer).ImportMemos(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: UserService_ImportMemos_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServiceServer).ImportMemos(ctx, req.(*ImportMemosRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var UserService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "memos.api.UserService",
|
|
HandlerType: (*UserServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ListUsers",
|
|
Handler: _UserService_ListUsers_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUser",
|
|
Handler: _UserService_GetUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "BatchGetUsers",
|
|
Handler: _UserService_BatchGetUsers_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateUser",
|
|
Handler: _UserService_CreateUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateUser",
|
|
Handler: _UserService_UpdateUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteUser",
|
|
Handler: _UserService_DeleteUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListUserSettings",
|
|
Handler: _UserService_ListUserSettings_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserSetting",
|
|
Handler: _UserService_GetUserSetting_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateUserSetting",
|
|
Handler: _UserService_UpdateUserSetting_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListUserStats",
|
|
Handler: _UserService_ListUserStats_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserStats",
|
|
Handler: _UserService_GetUserStats_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListMemoViews",
|
|
Handler: _UserService_ListMemoViews_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetMemoView",
|
|
Handler: _UserService_GetMemoView_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateMemoView",
|
|
Handler: _UserService_CreateMemoView_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateMemoView",
|
|
Handler: _UserService_UpdateMemoView_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteMemoView",
|
|
Handler: _UserService_DeleteMemoView_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListUserNotifications",
|
|
Handler: _UserService_ListUserNotifications_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateUserNotification",
|
|
Handler: _UserService_UpdateUserNotification_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteUserNotification",
|
|
Handler: _UserService_DeleteUserNotification_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListUserWebhooks",
|
|
Handler: _UserService_ListUserWebhooks_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateUserWebhook",
|
|
Handler: _UserService_CreateUserWebhook_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateUserWebhook",
|
|
Handler: _UserService_UpdateUserWebhook_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteUserWebhook",
|
|
Handler: _UserService_DeleteUserWebhook_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetUserWebhookSigningSecret",
|
|
Handler: _UserService_GetUserWebhookSigningSecret_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListLinkedIdentities",
|
|
Handler: _UserService_ListLinkedIdentities_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetLinkedIdentity",
|
|
Handler: _UserService_GetLinkedIdentity_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateLinkedIdentity",
|
|
Handler: _UserService_CreateLinkedIdentity_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteLinkedIdentity",
|
|
Handler: _UserService_DeleteLinkedIdentity_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListPersonalAccessTokens",
|
|
Handler: _UserService_ListPersonalAccessTokens_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreatePersonalAccessToken",
|
|
Handler: _UserService_CreatePersonalAccessToken_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeletePersonalAccessToken",
|
|
Handler: _UserService_DeletePersonalAccessToken_Handler,
|
|
},
|
|
{
|
|
MethodName: "ExportMemos",
|
|
Handler: _UserService_ExportMemos_Handler,
|
|
},
|
|
{
|
|
MethodName: "ImportMemos",
|
|
Handler: _UserService_ImportMemos_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "api/user_service.proto",
|
|
}
|