v2

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ListMemosFilterCELAttributes = []cel.EnvOption{
	cel.Variable("visibility", cel.StringType),
	cel.Variable("created_ts_before", cel.IntType),
	cel.Variable("created_ts_after", cel.IntType),
}

ListMemosFilterCELAttributes are the CEL attributes for ListMemosFilter.

Functions

This section is empty.

Types

type APIV2Service

type APIV2Service struct {
	Secret  string
	Profile *profile.Profile
	Store   *store.Store
	// contains filtered or unexported fields
}

func NewAPIV2Service

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

func (*APIV2Service) GetGRPCServer

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

func (*APIV2Service) RegisterGateway

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

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

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 ListMemosFilter added in v0.15.0

type ListMemosFilter struct {
	Visibility      *store.Visibility
	CreatedTsBefore *int64
	CreatedTsAfter  *int64
}

type MemoService

type MemoService struct {
	apiv2pb.UnimplementedMemoServiceServer

	Store *store.Store
}

func NewMemoService

func NewMemoService(store *store.Store) *MemoService

NewMemoService creates a new MemoService.

func (*MemoService) GetMemo

func (*MemoService) ListMemos

type ResourceService added in v0.15.0

type ResourceService struct {
	apiv2pb.UnimplementedResourceServiceServer

	Store *store.Store
}

func NewResourceService added in v0.15.0

func NewResourceService(store *store.Store) *ResourceService

NewResourceService creates a new ResourceService.

func (*ResourceService) ListResources added in v0.15.0

type SystemService

type SystemService struct {
	apiv2pb.UnimplementedSystemServiceServer

	Profile *profile.Profile
	Store   *store.Store
}

func NewSystemService

func NewSystemService(profile *profile.Profile, store *store.Store) *SystemService

NewSystemService creates a new SystemService.

func (*SystemService) GetSystemInfo

func (*SystemService) UpdateSystemInfo added in v0.15.0

type TagService

type TagService struct {
	apiv2pb.UnimplementedTagServiceServer

	Store *store.Store
}

func NewTagService

func NewTagService(store *store.Store) *TagService

NewTagService creates a new TagService.

func (*TagService) ListTags

type UserService

type UserService struct {
	apiv2pb.UnimplementedUserServiceServer

	Store  *store.Store
	Secret string
}

func NewUserService

func NewUserService(store *store.Store, secret string) *UserService

NewUserService creates a new UserService.

func (*UserService) CreateUserAccessToken added in v0.15.0

func (*UserService) DeleteUserAccessToken added in v0.15.0

func (*UserService) GetUser

func (*UserService) ListUserAccessTokens added in v0.15.0

func (*UserService) UpdateUser added in v0.15.0

func (*UserService) UpsertAccessTokenToStore added in v0.15.0

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

Jump to

Keyboard shortcuts

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