domain

package
v1.72.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package domain defines data structures for moving data between services.

Index

Constants

View Source
const DocumizeContextKey key = "documize context key"

DocumizeContextKey prevents key name collisions.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestContext

type RequestContext struct {
	AllowAnonymousAccess bool
	Authenticated        bool
	Guest                bool
	UserID               string
	OrgID                string
	OrgName              string
	SSL                  bool
	AppURL               string // e.g. https://{url}.documize.com
	Subdomain            string
	ClientIP             string
	Expires              time.Time
	Fullname             string
	Transaction          *sqlx.Tx
	AppVersion           string

	Administrator bool
	Analytics     bool
	Active        bool
	Editor        bool
	GlobalAdmin   bool
	ViewUsers     bool
}

RequestContext provides per request scoped values required by HTTP handlers.

func GetRequestContext

func GetRequestContext(r *http.Request) (ctx RequestContext)

GetRequestContext returns RequestContext from context.Context

func (*RequestContext) GetAppURL

func (c *RequestContext) GetAppURL(endpoint string) string

GetAppURL returns full HTTP url for the app

Directories

Path Synopsis
Package audit records user events.
Package audit records user events.
Package backup handle data backup/restore to/from ZIP format.
Package backup handle data backup/restore to/from ZIP format.
Package category handles API calls and persistence for categories.
Package category handles API calls and persistence for categories.
store
Package store provides the implementation for a file system based storage provider.
Package store provides the implementation for a file system based storage provider.
Package permission handles API calls and persistence for spaces.
Package permission handles API calls and persistence for spaces.
Package setting manages both global and user level settings Package setting manages both global and user level settings Package setting manages both global and user level settings
Package setting manages both global and user level settings Package setting manages both global and user level settings Package setting manages both global and user level settings
Package smtp provides access to SMTP server for sending email.
Package smtp provides access to SMTP server for sending email.
Package space handles API calls and persistence for spaces.
Package space handles API calls and persistence for spaces.

Jump to

Keyboard shortcuts

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