v2

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BotID is the id of bot.
	BotID = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIV2Service

func NewAPIV2Service

func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store, licenseService *license.LicenseService, grpcServerPort int) *APIV2Service

func (*APIV2Service) CreateCollection

func (*APIV2Service) CreateMemo

func (*APIV2Service) CreateShortcut

func (*APIV2Service) CreateUser

func (*APIV2Service) DeleteCollection

func (*APIV2Service) DeleteMemo

func (*APIV2Service) DeleteShortcut

func (*APIV2Service) DeleteUser

func (*APIV2Service) GetAuthStatus

func (*APIV2Service) GetCollection

func (*APIV2Service) GetCollectionByName

func (*APIV2Service) GetGRPCServer

func (s *APIV2Service) GetGRPCServer() *grpc.Server

func (*APIV2Service) GetMemo

func (*APIV2Service) GetShortcut

func (*APIV2Service) GetShortcutAnalytics

func (*APIV2Service) GetShortcutByName

func (*APIV2Service) GetUser

func (*APIV2Service) GetUserSetting

func (*APIV2Service) ListMemos

func (*APIV2Service) ListShortcuts

func (*APIV2Service) ListUserAccessTokens

func (*APIV2Service) ListUsers

func (*APIV2Service) RegisterGateway

func (s *APIV2Service) RegisterGateway(ctx context.Context, e *echo.Echo) error

RegisterGateway registers the gRPC-Gateway with the given Echo instance.

func (*APIV2Service) SignIn

func (*APIV2Service) SignOut

func (*APIV2Service) SignUp

func (*APIV2Service) UpdateCollection

func (*APIV2Service) UpdateMemo

func (*APIV2Service) UpdateShortcut

func (*APIV2Service) UpdateSubscription

func (*APIV2Service) UpdateUser

func (*APIV2Service) UpdateUserSetting

func (*APIV2Service) UpsertAccessTokenToStore

func (s *APIV2Service) UpsertAccessTokenToStore(ctx context.Context, user *store.User, accessToken, description string) error

type ContextKey

type ContextKey int

ContextKey is the key type of context value.

type GRPCAuthInterceptor

type GRPCAuthInterceptor struct {
	Store *store.Store
	// contains filtered or unexported fields
}

GRPCAuthInterceptor is the auth interceptor for gRPC server.

func NewGRPCAuthInterceptor

func NewGRPCAuthInterceptor(store *store.Store, secret string) *GRPCAuthInterceptor

NewGRPCAuthInterceptor returns a new API auth interceptor.

func (*GRPCAuthInterceptor) AuthenticationInterceptor

func (in *GRPCAuthInterceptor) AuthenticationInterceptor(ctx context.Context, request any, serverInfo *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)

AuthenticationInterceptor is the unary interceptor for gRPC API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL