Documentation
¶
Overview ¶
Package public_docs implements the anonymous, auth-exempt read surface backing PublicDocsAPI (see internal/api/server/artel_api/public_docs_grpc.pb.go's doc comment and docs/architecture.md). Every method here resolves its target vault by slug and only ever returns data for a published vault (domain.Vault.IsPublic) — it must never call user_context.GetUserContext, and must never depend on repository.VaultMembers or service.SubscriptionService, since callers here are never authenticated.
Index ¶
- type Service
- func (s *Service) GetNote(ctx context.Context, slug, path string) (couchdb.NoteDoc, error)
- func (s *Service) GetVaultBySlug(ctx context.Context, slug string) (domain.Vault, error)
- func (s *Service) ListFolders(ctx context.Context, slug string) ([]string, error)
- func (s *Service) ListNotes(ctx context.Context, slug string) ([]couchdb.NoteEntry, error)
- func (s *Service) ListTags(ctx context.Context, slug string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(repo repository.Repo) *Service
func (*Service) GetVaultBySlug ¶
func (*Service) ListFolders ¶
Click to show internal directories.
Click to hide internal directories.