Documentation ¶
Index ¶
- Variables
- type APIV2Service
- type ContextKey
- type GRPCAuthInterceptor
- type ListMemosFilter
- type MemoService
- type ResourceService
- type SystemService
- type TagService
- type UserService
- func (s *UserService) CreateUserAccessToken(ctx context.Context, request *apiv2pb.CreateUserAccessTokenRequest) (*apiv2pb.CreateUserAccessTokenResponse, error)
- func (s *UserService) DeleteUserAccessToken(ctx context.Context, request *apiv2pb.DeleteUserAccessTokenRequest) (*apiv2pb.DeleteUserAccessTokenResponse, error)
- func (s *UserService) GetUser(ctx context.Context, request *apiv2pb.GetUserRequest) (*apiv2pb.GetUserResponse, error)
- func (s *UserService) ListUserAccessTokens(ctx context.Context, request *apiv2pb.ListUserAccessTokensRequest) (*apiv2pb.ListUserAccessTokensResponse, error)
- func (s *UserService) UpdateUser(ctx context.Context, request *apiv2pb.UpdateUserRequest) (*apiv2pb.UpdateUserResponse, error)
- func (s *UserService) UpsertAccessTokenToStore(ctx context.Context, user *store.User, accessToken, description string) error
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 (*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 GRPCAuthInterceptor ¶
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 (s *MemoService) GetMemo(ctx context.Context, request *apiv2pb.GetMemoRequest) (*apiv2pb.GetMemoResponse, error)
func (*MemoService) ListMemos ¶
func (s *MemoService) ListMemos(ctx context.Context, request *apiv2pb.ListMemosRequest) (*apiv2pb.ListMemosResponse, error)
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
func (s *ResourceService) ListResources(ctx context.Context, _ *apiv2pb.ListResourcesRequest) (*apiv2pb.ListResourcesResponse, error)
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 (s *SystemService) GetSystemInfo(ctx context.Context, _ *apiv2pb.GetSystemInfoRequest) (*apiv2pb.GetSystemInfoResponse, error)
func (*SystemService) UpdateSystemInfo ¶ added in v0.15.0
func (s *SystemService) UpdateSystemInfo(ctx context.Context, request *apiv2pb.UpdateSystemInfoRequest) (*apiv2pb.UpdateSystemInfoResponse, error)
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 ¶
func (s *TagService) ListTags(ctx context.Context, request *apiv2pb.ListTagsRequest) (*apiv2pb.ListTagsResponse, error)
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 (s *UserService) CreateUserAccessToken(ctx context.Context, request *apiv2pb.CreateUserAccessTokenRequest) (*apiv2pb.CreateUserAccessTokenResponse, error)
func (*UserService) DeleteUserAccessToken ¶ added in v0.15.0
func (s *UserService) DeleteUserAccessToken(ctx context.Context, request *apiv2pb.DeleteUserAccessTokenRequest) (*apiv2pb.DeleteUserAccessTokenResponse, error)
func (*UserService) GetUser ¶
func (s *UserService) GetUser(ctx context.Context, request *apiv2pb.GetUserRequest) (*apiv2pb.GetUserResponse, error)
func (*UserService) ListUserAccessTokens ¶ added in v0.15.0
func (s *UserService) ListUserAccessTokens(ctx context.Context, request *apiv2pb.ListUserAccessTokensRequest) (*apiv2pb.ListUserAccessTokensResponse, error)
func (*UserService) UpdateUser ¶ added in v0.15.0
func (s *UserService) UpdateUser(ctx context.Context, request *apiv2pb.UpdateUserRequest) (*apiv2pb.UpdateUserResponse, error)
func (*UserService) UpsertAccessTokenToStore ¶ added in v0.15.0
Click to show internal directories.
Click to hide internal directories.