Documentation ¶
Index ¶
- Constants
- func NewByIDsHandler(ctx context.Context, svc FacebookProfileService, opts *kitworker.ServerOption, ...) (string, *httptransport.Server)
- func NewCreateHandler(ctx context.Context, svc FacebookProfileService, opts *kitworker.ServerOption, ...) (string, *httptransport.Server)
- func NewOneHandler(ctx context.Context, svc FacebookProfileService, opts *kitworker.ServerOption, ...) (string, *httptransport.Server)
- func NewUpdateHandler(ctx context.Context, svc FacebookProfileService, opts *kitworker.ServerOption, ...) (string, *httptransport.Server)
- func RegisterHandlers(ctx context.Context, svc FacebookProfileService, ...)
- type FacebookProfileClient
- func (f *FacebookProfileClient) ByIDs(ctx context.Context, req *[]string) (*[]*models.FacebookProfile, error)
- func (f *FacebookProfileClient) Create(ctx context.Context, req *models.FacebookProfile) (*models.FacebookProfile, error)
- func (f *FacebookProfileClient) One(ctx context.Context, req *int64) (*models.FacebookProfile, error)
- func (f *FacebookProfileClient) Update(ctx context.Context, req *models.FacebookProfile) (*models.FacebookProfile, error)
- type FacebookProfileService
Constants ¶
const ( EndpointNameByIDs = "byids" EndpointNameCreate = "create" EndpointNameOne = "one" EndpointNameUpdate = "update" )
const ServiceName = "facebookprofile"
Variables ¶
This section is empty.
Functions ¶
func NewByIDsHandler ¶
func NewByIDsHandler(ctx context.Context, svc FacebookProfileService, opts *kitworker.ServerOption, logger log.Logger) (string, *httptransport.Server)
ByIDs fetches multiple FacebookProfile from system by their IDs
func NewCreateHandler ¶
func NewCreateHandler(ctx context.Context, svc FacebookProfileService, opts *kitworker.ServerOption, logger log.Logger) (string, *httptransport.Server)
Create persists a FacebookProfile in the system
func NewOneHandler ¶
func NewOneHandler(ctx context.Context, svc FacebookProfileService, opts *kitworker.ServerOption, logger log.Logger) (string, *httptransport.Server)
One fetches an FacebookProfile from system by its ID
func NewUpdateHandler ¶
func NewUpdateHandler(ctx context.Context, svc FacebookProfileService, opts *kitworker.ServerOption, logger log.Logger) (string, *httptransport.Server)
Update updates the FacebookProfile on the system with given FacebookProfile data.
func RegisterHandlers ¶
func RegisterHandlers(ctx context.Context, svc FacebookProfileService, serverOpts *kitworker.ServerOption, logger log.Logger)
RegisterHandlers registers handlers of FacebookProfileService to the http.DefaultServeMux
Types ¶
type FacebookProfileClient ¶
type FacebookProfileClient struct { // ByIDsLoadBalancer provides remote call to byids endpoints ByIDsLoadBalancer lb.Balancer // CreateLoadBalancer provides remote call to create endpoints CreateLoadBalancer lb.Balancer // OneLoadBalancer provides remote call to one endpoints OneLoadBalancer lb.Balancer // UpdateLoadBalancer provides remote call to update endpoints UpdateLoadBalancer lb.Balancer }
FacebookProfileClient holds remote endpoint functions Satisfies FacebookProfileService interface
func NewFacebookProfileClient ¶
func NewFacebookProfileClient(clientOpts *kitworker.ClientOption, logger log.Logger) *FacebookProfileClient
NewFacebookProfileClient creates a new client for FacebookProfileService
func (*FacebookProfileClient) ByIDs ¶
func (f *FacebookProfileClient) ByIDs(ctx context.Context, req *[]string) (*[]*models.FacebookProfile, error)
ByIDs fetches multiple FacebookProfile from system by their IDs
func (*FacebookProfileClient) Create ¶
func (f *FacebookProfileClient) Create(ctx context.Context, req *models.FacebookProfile) (*models.FacebookProfile, error)
Create persists a FacebookProfile in the system
func (*FacebookProfileClient) One ¶
func (f *FacebookProfileClient) One(ctx context.Context, req *int64) (*models.FacebookProfile, error)
One fetches an FacebookProfile from system by its ID
func (*FacebookProfileClient) Update ¶
func (f *FacebookProfileClient) Update(ctx context.Context, req *models.FacebookProfile) (*models.FacebookProfile, error)
Update updates the FacebookProfile on the system with given FacebookProfile data.
type FacebookProfileService ¶
type FacebookProfileService interface { // ByIDs fetches multiple FacebookProfile from system by their IDs ByIDs(ctx context.Context, req *[]string) (res *[]*models.FacebookProfile, err error) // Create persists a FacebookProfile in the system Create(ctx context.Context, req *models.FacebookProfile) (res *models.FacebookProfile, err error) // One fetches an FacebookProfile from system by its ID One(ctx context.Context, req *int64) (res *models.FacebookProfile, err error) // Update updates the FacebookProfile on the system with given FacebookProfile // data. Update(ctx context.Context, req *models.FacebookProfile) (res *models.FacebookProfile, err error) }
Holds Facebook Profiles
func NewFacebookProfile ¶
func NewFacebookProfile() FacebookProfileService