package
0.0.0-20240121063802-9257a3a9a278
Repository: https://github.com/attendev/share.git
Documentation: pkg.go.dev

# README

Protocol Documentation

Table of Contents

Top

api/v1/common.proto

RowStatus

NameNumberDescription
ROW_STATUS_UNSPECIFIED0
ACTIVE1
ARCHIVED2

Top

api/v1/user_service.proto

CreateUserAccessTokenRequest

FieldTypeLabelDescription
namestringThe name of the user. Format: users/{username}
descriptionstring
expires_atgoogle.protobuf.Timestampoptional

CreateUserAccessTokenResponse

FieldTypeLabelDescription
access_tokenUserAccessToken

CreateUserRequest

FieldTypeLabelDescription
userUser

CreateUserResponse

FieldTypeLabelDescription
userUser

DeleteUserAccessTokenRequest

FieldTypeLabelDescription
namestringThe name of the user. Format: users/{username}
access_tokenstringaccess_token is the access token to delete.

DeleteUserAccessTokenResponse

DeleteUserRequest

FieldTypeLabelDescription
namestringThe name of the user. Format: users/{username}

DeleteUserResponse

GetUserRequest

FieldTypeLabelDescription
namestringThe name of the user. Format: users/{username}

GetUserResponse

FieldTypeLabelDescription
userUser

ListUserAccessTokensRequest

FieldTypeLabelDescription
namestringThe name of the user. Format: users/{username}

ListUserAccessTokensResponse

FieldTypeLabelDescription
access_tokensUserAccessTokenrepeated

ListUsersRequest

ListUsersResponse

FieldTypeLabelDescription
usersUserrepeated

UpdateUserRequest

FieldTypeLabelDescription
userUser
update_maskgoogle.protobuf.FieldMask

UpdateUserResponse

FieldTypeLabelDescription
userUser

User

FieldTypeLabelDescription
namestringThe name of the user. Format: users/{username}
idstring
usernamestring
emailstring
nicknamestring
avatar_urlstring
passwordstring
created_atgoogle.protobuf.Timestamp
updated_atgoogle.protobuf.Timestamp

UserAccessToken

FieldTypeLabelDescription
access_tokenstring
descriptionstring
issued_atgoogle.protobuf.Timestamp
expires_atgoogle.protobuf.Timestamp

UserService

Method NameRequest TypeResponse TypeDescription
ListUsersListUsersRequestListUsersResponseListUsers returns a list of users.
GetUserGetUserRequestGetUserResponseGetUser gets a user by name.
CreateUserCreateUserRequestCreateUserResponseCreateUser creates a new user.
UpdateUserUpdateUserRequestUpdateUserResponseUpdateUser updates a user.
DeleteUserDeleteUserRequestDeleteUserResponseDeleteUser deletes a user.
ListUserAccessTokensListUserAccessTokensRequestListUserAccessTokensResponseListUserAccessTokens returns a list of access tokens for a user.
CreateUserAccessTokenCreateUserAccessTokenRequestCreateUserAccessTokenResponseCreateUserAccessToken creates a new access token for a user.
DeleteUserAccessTokenDeleteUserAccessTokenRequestDeleteUserAccessTokenResponseDeleteUserAccessToken deletes an access token for a user.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)