(s *string)
| 2999 | } |
| 3000 | |
| 3001 | func validWorkspaceSchedule(s *string) (sql.NullString, error) { |
| 3002 | if ptr.NilOrEmpty(s) { |
| 3003 | return sql.NullString{}, nil |
| 3004 | } |
| 3005 | |
| 3006 | _, err := cron.Weekly(*s) |
| 3007 | if err != nil { |
| 3008 | return sql.NullString{}, err |
| 3009 | } |
| 3010 | |
| 3011 | return sql.NullString{ |
| 3012 | Valid: true, |
| 3013 | String: *s, |
| 3014 | }, nil |
| 3015 | } |
| 3016 | |
| 3017 | func (api *API) publishWorkspaceUpdate(ctx context.Context, ownerID uuid.UUID, event wspubsub.WorkspaceEvent) { |
| 3018 | err := event.Validate() |
no test coverage detected