gitee.com/openeuler/go-gitee@v0.0.0-20220530104019-3af895bc380c/gitee/hook_projecthook_accessors.go (about) 1 package gitee 2 3 func (pj *ProjectHook) GetNameSpace() string { 4 if pj == nil { 5 return "" 6 } 7 8 return pj.Namespace 9 } 10 11 func (pj *ProjectHook) GetPath() string { 12 if pj == nil { 13 return "" 14 } 15 16 return pj.Path 17 } 18 19 func (pj *ProjectHook) GetOwner() *UserHook { 20 if pj == nil { 21 return nil 22 } 23 24 return pj.Owner 25 } 26 27 func (pj *ProjectHook) GetOwnerAndRepo() (string, string) { 28 if pj == nil { 29 return "", "" 30 } 31 32 return pj.Namespace, pj.Path 33 }