MCPcopy Create free account
hub / github.com/git-bug/git-bug / validate

Method validate

bridge/core/auth/credential_base.go:97–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95}
96
97func (cb *credentialBase) validate() error {
98 if cb.target == "" {
99 return fmt.Errorf("missing target")
100 }
101 if cb.createTime.IsZero() || cb.createTime.Equal(time.Time{}) {
102 return fmt.Errorf("missing creation time")
103 }
104 if !core.TargetExist(cb.target) {
105 return fmt.Errorf("unknown target")
106 }
107 return nil
108}
109
110func (cb *credentialBase) Metadata() map[string]string {
111 return cb.meta

Callers 3

ValidateMethod · 0.45
ValidateMethod · 0.45
ValidateMethod · 0.45

Calls 2

TargetExistFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected