leo_s3_user¶
The s3-user operation.
References
Description¶
The s3-user operation
Function Index¶
auth/2 | Retrieve owners (omit secret_key). |
bulk_put/1 | Add buckets. |
checksum/0 | Retrieve checksum of the table. |
create_table/2 | Create user table(mnesia). |
delete/1 | Delete a user. |
find_all/0 | Retrieve all records. |
find_by_id/1 | Retrieve a user by user-id. |
put/1 | Insert a user. |
put/3 | Create a user account. |
transform/0 | Transform data. |
update/1 | Update a user. |
Function Details¶
auth/2¶
auth(UserId, Passwd) -> {ok, #'?S3_USER'{}} | {error, invalid_values}
- UserId = binary()
- Passwd = binary()
Retrieve owners (omit secret_key)
checksum/0¶
checksum() -> {ok, non_neg_integer()} | not_found | {error, any()}
Retrieve checksum of the table
create_table/2¶
create_table(Mode, Nodes) -> ok
- Mode = ram_copies | disc_copies
- Nodes = [atom()]
Create user table(mnesia)
find_by_id/1¶
find_by_id(UserId) -> {ok, #'?S3_USER'{}} | not_found | {error, any()}
- UserId = binary()
Retrieve a user by user-id
put/3¶
put(UserId, Password, WithS3Keys) -> ok | {ok, [tuple()]} | {error, any()}
- UserId = binary()
- Password = binary()
- WithS3Keys = boolean()
Create a user account