server

package
v0.0.0-...-474d2f3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OneYear  = 60 * 60 * 24 * 365
	OneMonth = 60 * 60 * 24 * 30
)
View Source
const UserCacheKey = "super-potato/pkg/server/CertifiedUser"

Variables

View Source
var TheAnonymousUser = AnonymousUser{}

Functions

This section is empty.

Types

type AnonymousUser

type AnonymousUser struct{}

func (AnonymousUser) Authenticated

func (AnonymousUser) Authenticated() bool

func (AnonymousUser) EmailAddress

func (AnonymousUser) EmailAddress() string

func (AnonymousUser) UserName

func (AnonymousUser) UserName() string

type CertifiedUser

type CertifiedUser struct {
	ClientCertificate pki.Certificate
	DistinguishedName string
}

func (*CertifiedUser) Authenticated

func (u *CertifiedUser) Authenticated() bool

func (*CertifiedUser) EmailAddress

func (u *CertifiedUser) EmailAddress() string

func (*CertifiedUser) UserName

func (u *CertifiedUser) UserName() string
type Header struct {
	http.Header
}

func (Header) Keys

func (h Header) Keys() []string

func (Header) MarshalXML

func (h Header) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type Markdown

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

func NewMarkdown

func NewMarkdown(r io.Reader) *Markdown

func (*Markdown) Render

func (m *Markdown) Render(w http.ResponseWriter) error

func (*Markdown) WriteContentType

func (m *Markdown) WriteContentType(w http.ResponseWriter)

type Server

type Server struct {
	*app.App      `flag:"-"`
	SessionCookie string `flag:"session-cookie" desc:"The name of the session cookie." env:"PKI_SESSION_COOKIE"`
	// contains filtered or unexported fields
}

func (*Server) Args

func (s *Server) Args(cmd *cobra.Command, args []string) error

func (*Server) GetSecret

func (s *Server) GetSecret() []byte

func (*Server) GetSessionStore

func (s *Server) GetSessionStore() sessions.Store

func (*Server) Init

func (s *Server) Init()

func (*Server) Run

func (s *Server) Run(cmd *cobra.Command, args []string) error

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) Use

func (s *Server) Use() string

type User

type User interface {
	UserName() string
	EmailAddress() string
	Authenticated() bool
}

Jump to

Keyboard shortcuts

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