Documentation ¶
Overview ¶
code generated by orbit
Index ¶
- Constants
- Variables
- type Client
- type CreateUserArg
- func (z *CreateUserArg) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *CreateUserArg) EncodeMsg(en *msgp.Writer) (err error)
- func (z *CreateUserArg) MarshalMsg(b []byte) (o []byte, err error)
- func (z *CreateUserArg) Msgsize() (s int)
- func (z *CreateUserArg) UnmarshalMsg(bts []byte) (o []byte, err error)
- type GetUserArg
- type GetUserProfileImageArg
- func (z *GetUserProfileImageArg) DecodeMsg(dc *msgp.Reader) (err error)
- func (z GetUserProfileImageArg) EncodeMsg(en *msgp.Writer) (err error)
- func (z GetUserProfileImageArg) MarshalMsg(b []byte) (o []byte, err error)
- func (z GetUserProfileImageArg) Msgsize() (s int)
- func (z *GetUserProfileImageArg) UnmarshalMsg(bts []byte) (o []byte, err error)
- type GetUserProfileImageRet
- func (z *GetUserProfileImageRet) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *GetUserProfileImageRet) EncodeMsg(en *msgp.Writer) (err error)
- func (z *GetUserProfileImageRet) MarshalMsg(b []byte) (o []byte, err error)
- func (z *GetUserProfileImageRet) Msgsize() (s int)
- func (z *GetUserProfileImageRet) UnmarshalMsg(bts []byte) (o []byte, err error)
- type GetUsersArg
- type GetUsersRet
- type LoginArg
- type Notification
- func (z *Notification) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *Notification) EncodeMsg(en *msgp.Writer) (err error)
- func (z *Notification) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Notification) Msgsize() (s int)
- func (z *Notification) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ObserveNotificationsArg
- func (z *ObserveNotificationsArg) DecodeMsg(dc *msgp.Reader) (err error)
- func (z ObserveNotificationsArg) EncodeMsg(en *msgp.Writer) (err error)
- func (z ObserveNotificationsArg) MarshalMsg(b []byte) (o []byte, err error)
- func (z ObserveNotificationsArg) Msgsize() (s int)
- func (z *ObserveNotificationsArg) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ObserveNotificationsClientStream
- type ObserveNotificationsServiceStream
- type RegisterArg
- type Service
- type ServiceHandler
- type UpdateUserArg
- func (z *UpdateUserArg) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *UpdateUserArg) EncodeMsg(en *msgp.Writer) (err error)
- func (z *UpdateUserArg) MarshalMsg(b []byte) (o []byte, err error)
- func (z *UpdateUserArg) Msgsize() (s int)
- func (z *UpdateUserArg) UnmarshalMsg(bts []byte) (o []byte, err error)
- type UpdateUserProfileImageArg
- func (z *UpdateUserProfileImageArg) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *UpdateUserProfileImageArg) EncodeMsg(en *msgp.Writer) (err error)
- func (z *UpdateUserProfileImageArg) MarshalMsg(b []byte) (o []byte, err error)
- func (z *UpdateUserProfileImageArg) Msgsize() (s int)
- func (z *UpdateUserProfileImageArg) UnmarshalMsg(bts []byte) (o []byte, err error)
- type UserDetail
- type UserOverview
- func (z *UserOverview) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *UserOverview) EncodeMsg(en *msgp.Writer) (err error)
- func (z *UserOverview) MarshalMsg(b []byte) (o []byte, err error)
- func (z *UserOverview) Msgsize() (s int)
- func (z *UserOverview) UnmarshalMsg(bts []byte) (o []byte, err error)
- type UserStatus
Constants ¶
const ( ErrCodeAuthFailed = 1 ErrCodeEmailAlreadyExists = 4 ErrCodeNameAlreadyExists = 3 ErrCodeNotFound = 2 )
const ( CallIDRegister = "Register" CallIDLogin = "Login" CallIDLogout = "Logout" CallIDGetUsers = "GetUsers" CallIDGetUser = "GetUser" CallIDGetUserProfileImage = "GetUserProfileImage" CallIDCreateUser = "CreateUser" CallIDUpdateUser = "UpdateUser" CallIDUpdateUserProfileImage = "UpdateUserProfileImage" StreamIDObserveNotifications = "ObserveNotifications" )
Variables ¶
var ( ErrAuthFailed = errors.New("auth failed") ErrEmailAlreadyExists = errors.New("email already exists") ErrNameAlreadyExists = errors.New("name already exists") ErrNotFound = errors.New("not found") )
var ErrClosed = errors.New("closed")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { closer.Closer StateChan() <-chan oclient.State // Calls Register(ctx context.Context, arg RegisterArg) (err error) Login(ctx context.Context, arg LoginArg) (err error) Logout(ctx context.Context) (err error) GetUsers(ctx context.Context, arg GetUsersArg) (ret GetUsersRet, err error) GetUser(ctx context.Context, arg GetUserArg) (ret UserDetail, err error) GetUserProfileImage(ctx context.Context, arg GetUserProfileImageArg) (ret GetUserProfileImageRet, err error) CreateUser(ctx context.Context, arg CreateUserArg) (ret UserDetail, err error) UpdateUser(ctx context.Context, arg UpdateUserArg) (err error) UpdateUserProfileImage(ctx context.Context, arg UpdateUserProfileImageArg) (err error) // Streams ObserveNotifications(ctx context.Context) (stream *ObserveNotificationsClientStream, err error) }
type CreateUserArg ¶
type CreateUserArg struct { UserName string `validate:"required,min=4"` FirstName string `validate:"required"` LastName string `validate:"required"` Email string `validate:"email"` }
func (*CreateUserArg) DecodeMsg ¶
func (z *CreateUserArg) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*CreateUserArg) EncodeMsg ¶
func (z *CreateUserArg) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*CreateUserArg) MarshalMsg ¶
func (z *CreateUserArg) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CreateUserArg) Msgsize ¶
func (z *CreateUserArg) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CreateUserArg) UnmarshalMsg ¶
func (z *CreateUserArg) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type GetUserArg ¶
type GetUserArg struct {
UserID string `validate:"required"`
}
func (*GetUserArg) DecodeMsg ¶
func (z *GetUserArg) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (GetUserArg) EncodeMsg ¶
func (z GetUserArg) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (GetUserArg) MarshalMsg ¶
func (z GetUserArg) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (GetUserArg) Msgsize ¶
func (z GetUserArg) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*GetUserArg) UnmarshalMsg ¶
func (z *GetUserArg) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type GetUserProfileImageArg ¶
type GetUserProfileImageArg struct {
UserID string `validate:"required"`
}
func (*GetUserProfileImageArg) DecodeMsg ¶
func (z *GetUserProfileImageArg) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (GetUserProfileImageArg) EncodeMsg ¶
func (z GetUserProfileImageArg) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (GetUserProfileImageArg) MarshalMsg ¶
func (z GetUserProfileImageArg) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (GetUserProfileImageArg) Msgsize ¶
func (z GetUserProfileImageArg) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*GetUserProfileImageArg) UnmarshalMsg ¶
func (z *GetUserProfileImageArg) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type GetUserProfileImageRet ¶
type GetUserProfileImageRet struct {
Jpeg []byte
}
func (*GetUserProfileImageRet) DecodeMsg ¶
func (z *GetUserProfileImageRet) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*GetUserProfileImageRet) EncodeMsg ¶
func (z *GetUserProfileImageRet) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*GetUserProfileImageRet) MarshalMsg ¶
func (z *GetUserProfileImageRet) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*GetUserProfileImageRet) Msgsize ¶
func (z *GetUserProfileImageRet) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*GetUserProfileImageRet) UnmarshalMsg ¶
func (z *GetUserProfileImageRet) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type GetUsersArg ¶
func (*GetUsersArg) DecodeMsg ¶
func (z *GetUsersArg) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (GetUsersArg) EncodeMsg ¶
func (z GetUsersArg) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (GetUsersArg) MarshalMsg ¶
func (z GetUsersArg) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (GetUsersArg) Msgsize ¶
func (z GetUsersArg) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*GetUsersArg) UnmarshalMsg ¶
func (z *GetUsersArg) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type GetUsersRet ¶
type GetUsersRet struct {
Users []UserOverview
}
func (*GetUsersRet) DecodeMsg ¶
func (z *GetUsersRet) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*GetUsersRet) EncodeMsg ¶
func (z *GetUsersRet) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*GetUsersRet) MarshalMsg ¶
func (z *GetUsersRet) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*GetUsersRet) Msgsize ¶
func (z *GetUsersRet) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*GetUsersRet) UnmarshalMsg ¶
func (z *GetUsersRet) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type LoginArg ¶
func (LoginArg) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type Notification ¶
type Notification struct { Id string Title string Description string ThumbnailJpeg []byte Link string }
func (*Notification) DecodeMsg ¶
func (z *Notification) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*Notification) EncodeMsg ¶
func (z *Notification) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*Notification) MarshalMsg ¶
func (z *Notification) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*Notification) Msgsize ¶
func (z *Notification) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Notification) UnmarshalMsg ¶
func (z *Notification) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ObserveNotificationsArg ¶
type ObserveNotificationsArg struct {
UserID string `validate:"required"`
}
func (*ObserveNotificationsArg) DecodeMsg ¶
func (z *ObserveNotificationsArg) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (ObserveNotificationsArg) EncodeMsg ¶
func (z ObserveNotificationsArg) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (ObserveNotificationsArg) MarshalMsg ¶
func (z ObserveNotificationsArg) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ObserveNotificationsArg) Msgsize ¶
func (z ObserveNotificationsArg) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ObserveNotificationsArg) UnmarshalMsg ¶
func (z *ObserveNotificationsArg) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ObserveNotificationsClientStream ¶
type ObserveNotificationsClientStream struct { oclient.TypedStreamCloser // contains filtered or unexported fields }
func (*ObserveNotificationsClientStream) Read ¶
func (v1 *ObserveNotificationsClientStream) Read() (ret Notification, err error)
func (*ObserveNotificationsClientStream) Write ¶
func (v1 *ObserveNotificationsClientStream) Write(arg ObserveNotificationsArg) (err error)
type ObserveNotificationsServiceStream ¶
type ObserveNotificationsServiceStream struct { oservice.TypedStreamCloser // contains filtered or unexported fields }
func (*ObserveNotificationsServiceStream) Read ¶
func (v1 *ObserveNotificationsServiceStream) Read() (arg ObserveNotificationsArg, err error)
func (*ObserveNotificationsServiceStream) Write ¶
func (v1 *ObserveNotificationsServiceStream) Write(ret Notification) (err error)
type RegisterArg ¶
type RegisterArg struct { Email string `validate:"email"` Password string `validate:"required,min=8"` }
func (*RegisterArg) DecodeMsg ¶
func (z *RegisterArg) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (RegisterArg) EncodeMsg ¶
func (z RegisterArg) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (RegisterArg) MarshalMsg ¶
func (z RegisterArg) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (RegisterArg) Msgsize ¶
func (z RegisterArg) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*RegisterArg) UnmarshalMsg ¶
func (z *RegisterArg) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Service ¶
func NewService ¶
func NewService(h ServiceHandler, opts *oservice.Options) (s Service, err error)
type ServiceHandler ¶
type ServiceHandler interface { // Calls Register(ctx oservice.Context, arg RegisterArg) (err error) Login(ctx oservice.Context, arg LoginArg) (err error) Logout(ctx oservice.Context) (err error) GetUsers(ctx oservice.Context, arg GetUsersArg) (ret GetUsersRet, err error) GetUser(ctx oservice.Context, arg GetUserArg) (ret UserDetail, err error) GetUserProfileImage(ctx oservice.Context, arg GetUserProfileImageArg) (ret GetUserProfileImageRet, err error) CreateUser(ctx oservice.Context, arg CreateUserArg) (ret UserDetail, err error) UpdateUser(ctx oservice.Context, arg UpdateUserArg) (err error) UpdateUserProfileImage(ctx oservice.Context, arg UpdateUserProfileImageArg) (err error) // Streams ObserveNotifications(ctx oservice.Context, stream *ObserveNotificationsServiceStream) error }
type UpdateUserArg ¶
type UpdateUserArg struct { UserID string `validate:"required"` UserName string `validate:"required,min=4"` FirstName string `validate:"required"` LastName string `validate:"required"` Status string Email string `validate:"email"` }
func (*UpdateUserArg) DecodeMsg ¶
func (z *UpdateUserArg) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*UpdateUserArg) EncodeMsg ¶
func (z *UpdateUserArg) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*UpdateUserArg) MarshalMsg ¶
func (z *UpdateUserArg) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*UpdateUserArg) Msgsize ¶
func (z *UpdateUserArg) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*UpdateUserArg) UnmarshalMsg ¶
func (z *UpdateUserArg) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type UpdateUserProfileImageArg ¶
func (*UpdateUserProfileImageArg) DecodeMsg ¶
func (z *UpdateUserProfileImageArg) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*UpdateUserProfileImageArg) EncodeMsg ¶
func (z *UpdateUserProfileImageArg) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*UpdateUserProfileImageArg) MarshalMsg ¶
func (z *UpdateUserProfileImageArg) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*UpdateUserProfileImageArg) Msgsize ¶
func (z *UpdateUserProfileImageArg) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*UpdateUserProfileImageArg) UnmarshalMsg ¶
func (z *UpdateUserProfileImageArg) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type UserDetail ¶
type UserDetail struct { Overview UserOverview NumberPosts int NumberFollowing int NumberFriends int UserStatus UserStatus }
func (*UserDetail) DecodeMsg ¶
func (z *UserDetail) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*UserDetail) EncodeMsg ¶
func (z *UserDetail) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*UserDetail) MarshalMsg ¶
func (z *UserDetail) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*UserDetail) Msgsize ¶
func (z *UserDetail) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*UserDetail) UnmarshalMsg ¶
func (z *UserDetail) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type UserOverview ¶
type UserOverview struct { Id string UserName string FirstName string LastName string JoinedOn time.Time Status string NumberFollowers int }
func (*UserOverview) DecodeMsg ¶
func (z *UserOverview) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*UserOverview) EncodeMsg ¶
func (z *UserOverview) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*UserOverview) MarshalMsg ¶
func (z *UserOverview) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*UserOverview) Msgsize ¶
func (z *UserOverview) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*UserOverview) UnmarshalMsg ¶
func (z *UserOverview) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type UserStatus ¶
type UserStatus int
const ( UserStatusEmailNotVerified UserStatus = 1 UserStatusActive UserStatus = 2 UserStatusBlocked UserStatus = 3 )
func (*UserStatus) DecodeMsg ¶
func (z *UserStatus) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (UserStatus) EncodeMsg ¶
func (z UserStatus) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (UserStatus) MarshalMsg ¶
func (z UserStatus) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (UserStatus) Msgsize ¶
func (z UserStatus) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*UserStatus) UnmarshalMsg ¶
func (z *UserStatus) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler