(url string, opts shareLinkUpdateOptions)
| 130 | } |
| 131 | |
| 132 | func newShareLinkUpdateInput(url string, opts shareLinkUpdateOptions) shareLinkUpdateInput { |
| 133 | input := shareLinkUpdateInput{ |
| 134 | URL: url, |
| 135 | RemoveExpiration: opts.removeExpiration, |
| 136 | AllowDownload: opts.allowDownload, |
| 137 | DisallowDownload: opts.disallowDownload, |
| 138 | Password: opts.password.set, |
| 139 | RemovePassword: opts.removePassword, |
| 140 | } |
| 141 | if opts.audience != nil { |
| 142 | input.Audience = opts.audience.Tag |
| 143 | } |
| 144 | if opts.expires != nil { |
| 145 | input.Expires = opts.expires.UTC().Format(time.RFC3339) |
| 146 | } |
| 147 | return input |
| 148 | } |
| 149 | |
| 150 | func parseShareLinkUpdateOptions(cmd *cobra.Command) (shareLinkUpdateOptions, error) { |
| 151 | expiresChanged := cmd.Flags().Changed("expires") |
no outgoing calls
no test coverage detected