Documentation ¶
Index ¶
- type User
- func (u *User) AllocateStorage(ctx context.Context, size int64) (*types.UserInfo, error)
- func (u *User) CreateAPIKey(ctx context.Context, keyName string, perms []types.UserAccessControl, ...) (string, error)
- func (u *User) CreateAsset(ctx context.Context, req *types.CreateAssetReq) (*types.CreateAssetRsp, error)
- func (u *User) DeleteAPIKey(ctx context.Context, name string) error
- func (u *User) DeleteAsset(ctx context.Context, cid string) error
- func (u *User) GetAPIKeys(ctx context.Context) (map[string]types.UserAPIKeysInfo, error)
- func (u *User) GetAssetStatus(ctx context.Context, assetCID string, config *config.SchedulerCfg) (*types.AssetStatus, error)
- func (u *User) GetInfo() (*types.UserInfo, error)
- func (u *User) ListAssets(ctx context.Context, limit, offset, maxCountOfVisitAsset, groupID int) (*types.ListAssetRecordRsp, error)
- func (u *User) SetAssetAtShareStatus(ctx context.Context, assetCID string) error
- func (u *User) ShareAssets(ctx context.Context, assetCIDs []string, schedulerAPI api.Scheduler, ...) (map[string]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
func (*User) AllocateStorage ¶
AllocateStorage allocates storage space.
func (*User) CreateAPIKey ¶
func (u *User) CreateAPIKey(ctx context.Context, keyName string, perms []types.UserAccessControl, schedulerCfg *config.SchedulerCfg, commonAPI api.Common) (string, error)
CreateAPIKey creates a key for the client API.
func (*User) CreateAsset ¶
func (u *User) CreateAsset(ctx context.Context, req *types.CreateAssetReq) (*types.CreateAssetRsp, error)
CreateAsset creates an asset with car CID, car name, and car size.
func (*User) DeleteAsset ¶
DeleteAsset deletes the assets of the user.
func (*User) GetAPIKeys ¶
GetAPIKeys get all api key for user.
func (*User) GetAssetStatus ¶ added in v0.1.11
func (u *User) GetAssetStatus(ctx context.Context, assetCID string, config *config.SchedulerCfg) (*types.AssetStatus, error)
GetAssetStatus retrieves a asset status
func (*User) ListAssets ¶
func (u *User) ListAssets(ctx context.Context, limit, offset, maxCountOfVisitAsset, groupID int) (*types.ListAssetRecordRsp, error)
ListAssets lists the assets of the user.
func (*User) SetAssetAtShareStatus ¶ added in v0.1.11
UpdateShareStatus update status
Click to show internal directories.
Click to hide internal directories.