27 lines
661 B
Go
27 lines
661 B
Go
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
|
|
}
|