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

Function applySharedLinkCreateSettings

cmd/share_link_create.go:257–275  ·  view source on GitHub ↗
(settings *sharing.SharedLinkSettings, opts shareLinkCreateOptions)

Source from the content-addressed store, hash-verified

255}
256
257func applySharedLinkCreateSettings(settings *sharing.SharedLinkSettings, opts shareLinkCreateOptions) {
258 if opts.expires != nil {
259 t := dropbox.DBXTime(*opts.expires)
260 settings.Expires = &t
261 }
262 if opts.allowDownload {
263 settings.AllowDownload = true
264 }
265 if opts.access != nil {
266 settings.Access = opts.access
267 }
268 if opts.audience != nil {
269 settings.Audience = opts.audience
270 }
271 if opts.password.set {
272 settings.RequirePassword = true
273 settings.LinkPassword = opts.password.password
274 }
275}
276
277func rawSharedLinkSettingsFromCreateOptions(opts shareLinkCreateOptions) *rawSharedLinkSettings {
278 settings := &rawSharedLinkSettings{

Callers 2

createSharedLinkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected