tokens

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateFileTokenOption

type CreateFileTokenOption func(*CreateFileTokenOptions)

type CreateFileTokenOptions

type CreateFileTokenOptions struct {
	Expire string
	// contains filtered or unexported fields
}

func (CreateFileTokenOptions) New

type ListOption

type ListOption func(*ListOptions)

type ListOptions

type ListOptions struct {
	Queries []string
	// contains filtered or unexported fields
}

func (ListOptions) New

func (options ListOptions) New() *ListOptions

type Tokens

type Tokens struct {
	// contains filtered or unexported fields
}

Tokens service

func New

func New(clt client.Client) *Tokens

func (*Tokens) CreateFileToken

func (srv *Tokens) CreateFileToken(BucketId string, FileId string, optionalSetters ...CreateFileTokenOption) (*models.ResourceToken, error)

CreateFileToken create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.

func (*Tokens) Delete

func (srv *Tokens) Delete(TokenId string) (*interface{}, error)

Delete delete a token by its unique ID.

func (*Tokens) Get

func (srv *Tokens) Get(TokenId string) (*models.ResourceToken, error)

Get get a token by its unique ID.

func (*Tokens) List

func (srv *Tokens) List(BucketId string, FileId string, optionalSetters ...ListOption) (*models.ResourceTokenList, error)

List list all the tokens created for a specific file or bucket. You can use the query params to filter your results.

func (*Tokens) Update

func (srv *Tokens) Update(TokenId string, optionalSetters ...UpdateOption) (*models.ResourceToken, error)

Update update a token by its unique ID. Use this endpoint to update a token's expiry date.

func (*Tokens) WithCreateFileTokenExpire

func (srv *Tokens) WithCreateFileTokenExpire(v string) CreateFileTokenOption

func (*Tokens) WithListQueries

func (srv *Tokens) WithListQueries(v []string) ListOption

func (*Tokens) WithUpdateExpire

func (srv *Tokens) WithUpdateExpire(v string) UpdateOption

type UpdateOption

type UpdateOption func(*UpdateOptions)

type UpdateOptions

type UpdateOptions struct {
	Expire string
	// contains filtered or unexported fields
}

func (UpdateOptions) New

func (options UpdateOptions) New() *UpdateOptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL