renderer

package
v0.0.0-...-de44970 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFilters

func RegisterFilters()

RegisterFilters ...

func RegisterTags

func RegisterTags()

RegisterTags ...

Types

type ReactConfig

type ReactConfig struct {
	DSN                string        `json:"dsn"`
	NeedsUpgrade       bool          `json:"needsUpgrade"`
	Version            SentryVersion `json:"version"`
	Features           []string      `json:"features"`
	IsAuthenticated    bool          `json:"isAuthenticated"`
	MediaURL           string        `json:"mediaUrl"`
	SingleOrganization bool          `json:"singleOrganization"`
	Messages           []string      `json:"messages"` // TODO double check this
	URLPrefix          string        `json:"urlPrefix"`
	User               User          `json:"user"`
}

ReactConfig .. TODO Consider use *url.URL, *mail.Address instead of string type and use custom JSON marshaller

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

func New

func New(box *rice.Box) *Renderer

func (*Renderer) Render

func (r *Renderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error

type SentryVersion

type SentryVersion struct {
	Current          string `json:"current"` // TODO int.int.int
	Build            string `json:"build"`   // int.int.int
	UpgradeAvailable bool   `json:"upgradeAvailable"`
	Latest           string `json:"latest"` // int.int.int
	// contains filtered or unexported fields
}

SentryVersion ..

type User

type User struct {
	// TODO investigate why embedding models.User does not work
	models.User
	ID       int    `db:"id" json:"id,string"`
	Username string `db:"username" json:"username"`
	// this column is called first_name for legacy reasons, but it is the entire
	//   display name
	Name        string `db:"first_name" json:"name"`
	Email       string `db:"email" json:"email"`
	IsSuperuser bool   `db:"is_superuser" json:"isSuperuser"`

	AvatarURL string      `json:"avatarUrl"`
	Options   UserOptions `json:"options"`
}

User ..

type UserContext

type UserContext struct {
	ID        int    `json:"id"`
	Name      string `json:"name,omitempty"`
	Email     string `json:"email"`
	IPAddress string `json:"ip_address"`
}

UserContext ..

type UserOptions

type UserOptions struct {
	Timezone        string `json:"timezone"`        // TODO double check this
	StacktraceOrder string `json:"stacktraceOrder"` // default
	Language        string `json:"language"`
	Clock24Hours    bool   `json:"clock24Hours"`
}

UserOptions ..

Jump to

Keyboard shortcuts

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