MCPcopy Create free account
hub / github.com/dropbox/dbxcli / newShareLinkUpdateInput

Function newShareLinkUpdateInput

cmd/share_link_update.go:132–148  ·  view source on GitHub ↗
(url string, opts shareLinkUpdateOptions)

Source from the content-addressed store, hash-verified

130}
131
132func 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
150func parseShareLinkUpdateOptions(cmd *cobra.Command) (shareLinkUpdateOptions, error) {
151 expiresChanged := cmd.Flags().Changed("expires")

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected