modules

package
v0.0.0-...-99ddcf2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2014 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenUrl = "api/v2/initialToken"
	UserUrl  = "api/v2/users"
)

Variables

This section is empty.

Functions

func BuildUrl

func BuildUrl(parts ...string) string

func GetClient

func GetClient() *http.Client

Types

type Authentication

type Authentication struct {
	Token  string
	User   ResponseUser
	Entity models.User
}

func (*Authentication) Login

func (this *Authentication) Login(config map[string]interface{}, username string, password string) bool

type Configuration

type Configuration struct{}

func (*Configuration) Get

func (this *Configuration) Get() config.ConfigContainer

func (*Configuration) Key

func (this *Configuration) Key(key string) map[string]interface{}

type Request

type Request struct{}

func (*Request) Post

func (this *Request) Post(url string, query []byte) ([]byte, int)

func (*Request) Put

func (this *Request) Put(url string, query []byte) ([]byte, int)

func (*Request) Query

func (this *Request) Query(method string, url string, query []byte) ([]byte, int)

type RequestToken

type RequestToken struct {
	ServiceName   string `json:"serviceName"`
	ServiceSecret string `json:"serviceSecret"`
	UserName      string `json:"userName"`
	UserPassword  string `json:"userPassword"`
}

type RequestUser

type RequestUser struct {
	ServiceSecret string `json:"serviceSecret"`
}

type ResponseToken

type ResponseToken struct {
	Token string `json:"token"`
}

type ResponseUser

type ResponseUser struct {
	UserId          string `json:"userId"`
	EmployeeNumber  string `json:"employeeNumber"`
	DisplayName     string `json:"displayName"`
	Mail            string `json:"mail"`
	Domain          string `json:"domain"`
	Title           string `json:"title"`
	Department      string `json:"department"`
	Team            string `json:"team"`
	ManagerUsername string `json:"managerUsername"`
}

Jump to

Keyboard shortcuts

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