facebookprofile

package
v0.0.0-...-17fbf12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EndpointNameByIDs  = "byids"
	EndpointNameCreate = "create"
	EndpointNameOne    = "one"
	EndpointNameUpdate = "update"
)
View Source
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

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

ByIDs fetches multiple FacebookProfile from system by their IDs

func (*FacebookProfileClient) Create

Create persists a FacebookProfile in the system

func (*FacebookProfileClient) One

One fetches an FacebookProfile from system by its ID

func (*FacebookProfileClient) Update

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL