Documentation
¶
Index ¶
- Variables
- type APIV2Service
- type ContextKey
- type GRPCAuthInterceptor
- type ListMemosFilter
- type MemoService
- func (s *MemoService) CreateMemo(ctx context.Context, request *apiv2pb.CreateMemoRequest) (*apiv2pb.CreateMemoResponse, error)
- func (s *MemoService) CreateMemoComment(ctx context.Context, request *apiv2pb.CreateMemoCommentRequest) (*apiv2pb.CreateMemoCommentResponse, error)
- func (s *MemoService) GetMemo(ctx context.Context, request *apiv2pb.GetMemoRequest) (*apiv2pb.GetMemoResponse, error)
- func (s *MemoService) ListMemoComments(ctx context.Context, request *apiv2pb.ListMemoCommentsRequest) (*apiv2pb.ListMemoCommentsResponse, error)
- func (s *MemoService) ListMemos(ctx context.Context, request *apiv2pb.ListMemosRequest) (*apiv2pb.ListMemosResponse, error)
- type ResourceService
- func (s *ResourceService) DeleteResource(ctx context.Context, request *apiv2pb.DeleteResourceRequest) (*apiv2pb.DeleteResourceResponse, error)
- func (s *ResourceService) ListResources(ctx context.Context, _ *apiv2pb.ListResourcesRequest) (*apiv2pb.ListResourcesResponse, error)
- func (s *ResourceService) UpdateResource(ctx context.Context, request *apiv2pb.UpdateResourceRequest) (*apiv2pb.UpdateResourceResponse, error)
- type SystemService
- type TagService
- func (s *TagService) DeleteTag(ctx context.Context, request *apiv2pb.DeleteTagRequest) (*apiv2pb.DeleteTagResponse, error)
- func (s *TagService) ListTags(ctx context.Context, request *apiv2pb.ListTagsRequest) (*apiv2pb.ListTagsResponse, error)
- func (s *TagService) UpsertTag(ctx context.Context, request *apiv2pb.UpsertTagRequest) (*apiv2pb.UpsertTagResponse, error)
- 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 ¶
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) CreateMemo ¶ added in v0.16.0
func (s *MemoService) CreateMemo(ctx context.Context, request *apiv2pb.CreateMemoRequest) (*apiv2pb.CreateMemoResponse, error)
func (*MemoService) CreateMemoComment ¶ added in v0.16.0
func (s *MemoService) CreateMemoComment(ctx context.Context, request *apiv2pb.CreateMemoCommentRequest) (*apiv2pb.CreateMemoCommentResponse, error)
func (*MemoService) GetMemo ¶
func (s *MemoService) GetMemo(ctx context.Context, request *apiv2pb.GetMemoRequest) (*apiv2pb.GetMemoResponse, error)
func (*MemoService) ListMemoComments ¶ added in v0.16.0
func (s *MemoService) ListMemoComments(ctx context.Context, request *apiv2pb.ListMemoCommentsRequest) (*apiv2pb.ListMemoCommentsResponse, 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
Profile *profile.Profile
Store *store.Store
}
func NewResourceService ¶ added in v0.15.0
func NewResourceService(profile *profile.Profile, store *store.Store) *ResourceService
NewResourceService creates a new ResourceService.
func (*ResourceService) DeleteResource ¶ added in v0.16.0
func (s *ResourceService) DeleteResource(ctx context.Context, request *apiv2pb.DeleteResourceRequest) (*apiv2pb.DeleteResourceResponse, error)
func (*ResourceService) ListResources ¶ added in v0.15.0
func (s *ResourceService) ListResources(ctx context.Context, _ *apiv2pb.ListResourcesRequest) (*apiv2pb.ListResourcesResponse, error)
func (*ResourceService) UpdateResource ¶ added in v0.16.0
func (s *ResourceService) UpdateResource(ctx context.Context, request *apiv2pb.UpdateResourceRequest) (*apiv2pb.UpdateResourceResponse, 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) DeleteTag ¶ added in v0.16.0
func (s *TagService) DeleteTag(ctx context.Context, request *apiv2pb.DeleteTagRequest) (*apiv2pb.DeleteTagResponse, error)
func (*TagService) ListTags ¶
func (s *TagService) ListTags(ctx context.Context, request *apiv2pb.ListTagsRequest) (*apiv2pb.ListTagsResponse, error)
func (*TagService) UpsertTag ¶ added in v0.16.0
func (s *TagService) UpsertTag(ctx context.Context, request *apiv2pb.UpsertTagRequest) (*apiv2pb.UpsertTagResponse, 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.