profile

package
v0.30.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	// Demo indicates if the server is in demo mode
	Demo bool
	// Addr is the binding address for server
	Addr string
	// Port is the binding port for server
	Port int
	// UNIXSock is the IPC binding path. Overrides Addr and Port
	UNIXSock string
	// Data is the data directory
	Data string
	// DSN points to where memos stores its own data
	DSN string
	// Driver is the database driver
	// sqlite, mysql
	Driver string
	// Version is the current version of server
	Version string
	// Commit is the current build commit of server
	Commit string
	// InstanceURL is the url of your memos instance.
	InstanceURL string
}

Profile is the configuration to start main server.

func (*Profile) AllowAnonymous added in v0.30.0

func (p *Profile) AllowAnonymous() bool

AllowAnonymous reports whether unauthenticated visitors may access the instance.

Anonymous access is enabled only when an InstanceURL is configured. An instance with no InstanceURL set is treated as private: anonymous callers are limited to the auth-bootstrap endpoints (sign-in, share links, etc.) and the web UI redirects them to the sign-in page instead of the public Explore view. Authenticated callers (session, access token, or personal access token) are never affected.

func (*Profile) Validate

func (p *Profile) Validate() error

Jump to

Keyboard shortcuts

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