api

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Actions = &ActionCache{M: make(map[int]*Action)}
View Source
var Users = &UsersCache{M: make(map[string][]*uic.User)}

Functions

func CurlUic

func CurlUic(team string) []*uic.User

func GetUsers

func GetUsers(teams string) map[string]*uic.User

func LinkToSMS

func LinkToSMS(content string) (string, error)

func ParseTeams

func ParseTeams(teams string) ([]string, []string, []string)

return phones, emails, IM

func UsersOf

func UsersOf(team string) []*uic.User

Types

type APIGetTeamOutput

type APIGetTeamOutput struct {
	uic.Team
	Users       []*uic.User `json:"users"`
	TeamCreator string      `json:"creator_name"`
}

type Action

type Action struct {
	Id                 int    `json:"id"`
	Uic                string `json:"uic"`
	Url                string `json:"url"`
	Callback           int    `json:"callback"`
	BeforeCallbackSms  int    `json:"before_callback_sms"`
	BeforeCallbackMail int    `json:"before_callback_mail"`
	AfterCallbackSms   int    `json:"after_callback_sms"`
	AfterCallbackMail  int    `json:"after_callback_mail"`
}

TODO:use api/app/model/falcon_portal/action.go

func CurlAction

func CurlAction(id int) *Action

func GetAction

func GetAction(id int) *Action

type ActionCache

type ActionCache struct {
	sync.RWMutex
	M map[int]*Action
}

func (*ActionCache) Get

func (this *ActionCache) Get(id int) *Action

func (*ActionCache) Set

func (this *ActionCache) Set(id int, action *Action)

type UsersCache

type UsersCache struct {
	sync.RWMutex
	M map[string][]*uic.User
}

func (*UsersCache) Get

func (this *UsersCache) Get(team string) []*uic.User

func (*UsersCache) Set

func (this *UsersCache) Set(team string, users []*uic.User)

Jump to

Keyboard shortcuts

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