WIP maatma domains interface
This commit is contained in:
parent
5de19436e0
commit
cd848e3ff6
2 changed files with 102 additions and 0 deletions
26
token-validator/domain.go
Normal file
26
token-validator/domain.go
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
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
|
||||
}
|
||||
Reference in a new issue