dcos-oauth: github.com/Bowbaq/dcos-oauth/common Index | Files

package common

import "github.com/Bowbaq/dcos-oauth/common"

Index

Package Files

cli.go flags.go routes.go serve.go utils.go

Variables

var (
    FlAddr = cli.StringFlag{
        Name:  "addr",
        Usage: "<ip>:<port> to listen on",
        Value: "127.0.0.1:8101",
    }

    FlZkAddr = cli.StringFlag{
        Name:  "zk-addr",
        Usage: "<ip>[:<port>] to bind to",
        Value: "127.0.0.1:2181",
    }
)

func CreateParents Uses

func CreateParents(c IZk, path string, data []byte) error

func NewRouter Uses

func NewRouter(ctx context.Context, routes map[string]map[string]Handler) *mux.Router

func ReadLine Uses

func ReadLine(name string) ([]byte, error)

func Run Uses

func Run(name string, commands ...cli.Command)

func ServeCmd Uses

func ServeCmd(c *cli.Context, ctx context.Context, routes map[string]map[string]Handler) error

func ValidateEmail Uses

func ValidateEmail(email string) bool

type Handler Uses

type Handler func(ctx context.Context, w http.ResponseWriter, r *http.Request) *HttpError

type HttpError Uses

type HttpError struct {
    Title       string `json:"title"`
    Description string `json:"description"`
    Status      int    `json:"-"`
}

func NewHttpError Uses

func NewHttpError(description string, status int) *HttpError

type IZk Uses

type IZk interface {
    Children(path string) ([]string, *zk.Stat, error)
    Create(path string, data []byte, flags int32, acl []zk.ACL) (string, error)
    Delete(path string, version int32) error
    Exists(path string) (bool, *zk.Stat, error)
    Get(path string) ([]byte, *zk.Stat, error)
}

Package common imports 14 packages (graph). Updated 2017-07-02. Refresh now. Tools for package owners. This is a quick bug-fix fork (has fewer than three commits, and only during the week it was created).