MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / ValidateUUID

Method ValidateUUID

api/pkg/validators/validator.go:166–182  ·  view source on GitHub ↗

ValidateUUID that the payload is a UUID

(ID string, name string)

Source from the content-addressed store, hash-verified

164
165// ValidateUUID that the payload is a UUID
166func (validator *validator) ValidateUUID(ID string, name string) url.Values {
167 request := map[string]string{
168 name: ID,
169 }
170
171 v := govalidator.New(govalidator.Options{
172 Data: &request,
173 Rules: govalidator.MapData{
174 name: []string{
175 "required",
176 "uuid",
177 },
178 },
179 })
180
181 return v.ValidateStruct()
182}
183
184func validateAttachmentURL(ctx context.Context, c cache.Cache, attachmentURL string) error {
185 cacheKey := "mms-url-validation:" + attachmentURL

Callers 7

DeleteMethod · 0.80
DeleteMethod · 0.80
deleteMethod · 0.80
deletePhoneMethod · 0.80
DeleteMethod · 0.80
GetMethod · 0.80
DeleteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected