This repository has been archived on 2024-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
adlin/token-validator/domain.go

27 lines
661 B
Go
Raw Normal View History

2019-03-13 23:05:45 +00:00
package main
import (
"github.com/julienschmidt/httprouter"
)
func init() {
router.GET("/api/ddomains/", apiAuthHandler(func (student Student, ps httprouter.Params, body []byte) (interface{}, error) {
return student.GetDelegatedDomains()
}))
router.GET("/api/ddomains/:dn", apiAuthHandler(func (student Student, ps httprouter.Params, body []byte) (interface{}, error) {
return student.GetDelegatedDomain(ps.ByName("dn"))
}))
}
type DelegatedDomain struct {
}
func (student Student) GetDelegatedDomain(dn string) (d DelegatedDomain, err error) {
return
}
func (student Student) GetDelegatedDomains() (ds []DelegatedDomain, err error) {
return
}