v1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: AGPL-3.0 Imports: 31 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 APIV1Service

func NewAPIV1Service

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

func (*APIV1Service) CreateCollection

func (*APIV1Service) CreateShortcut

func (*APIV1Service) CreateUser

func (*APIV1Service) DeleteCollection

func (*APIV1Service) DeleteShortcut

func (*APIV1Service) DeleteUser

func (*APIV1Service) GetAuthStatus

func (*APIV1Service) GetCollection

func (*APIV1Service) GetCollectionByName

func (*APIV1Service) GetGRPCServer

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

func (*APIV1Service) GetShortcut

func (*APIV1Service) GetShortcutAnalytics

func (*APIV1Service) GetShortcutByName

func (*APIV1Service) GetUser

func (*APIV1Service) GetUserSetting

func (*APIV1Service) ListShortcuts

func (*APIV1Service) ListUserAccessTokens

func (*APIV1Service) ListUsers

func (*APIV1Service) RegisterGateway

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

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

func (*APIV1Service) SignIn

func (*APIV1Service) SignOut

func (*APIV1Service) SignUp

func (*APIV1Service) UpdateCollection

func (*APIV1Service) UpdateShortcut

func (*APIV1Service) UpdateSubscription

func (*APIV1Service) UpdateUser

func (*APIV1Service) UpdateUserSetting

func (*APIV1Service) UpsertAccessTokenToStore

func (s *APIV1Service) 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.

type LoggerInterceptor

type LoggerInterceptor struct {
}

func NewLoggerInterceptor

func NewLoggerInterceptor() *LoggerInterceptor

func (*LoggerInterceptor) LoggerInterceptor

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

Jump to

Keyboard shortcuts

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