resume

package
v2.1.3+incompatible Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "resume"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [2]string{"list", "add"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func NewAddEndpoint

func NewAddEndpoint(s Service) goa.Endpoint

NewAddEndpoint returns an endpoint function that calls the method "add" of service "resume".

func NewListEndpoint

func NewListEndpoint(s Service) goa.Endpoint

NewListEndpoint returns an endpoint function that calls the method "list" of service "resume".

func NewViewedStoredResumeCollection

func NewViewedStoredResumeCollection(res StoredResumeCollection, view string) resumeviews.StoredResumeCollection

NewViewedStoredResumeCollection initializes viewed result type StoredResumeCollection from result type StoredResumeCollection using the given view.

Types

type Client

type Client struct {
	ListEndpoint goa.Endpoint
	AddEndpoint  goa.Endpoint
}

Client is the "resume" service client.

func NewClient

func NewClient(list, add goa.Endpoint) *Client

NewClient initializes a "resume" service client given the endpoints.

func (*Client) Add

func (c *Client) Add(ctx context.Context, p []*Resume) (res []int, err error)

Add calls the "add" endpoint of the "resume" service.

func (*Client) List

func (c *Client) List(ctx context.Context) (res StoredResumeCollection, err error)

List calls the "list" endpoint of the "resume" service.

type Education

type Education struct {
	// Name of the institution
	Institution string
	// Major name
	Major string
}

type Endpoints

type Endpoints struct {
	List goa.Endpoint
	Add  goa.Endpoint
}

Endpoints wraps the "resume" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "resume" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "resume" service endpoints.

type Experience

type Experience struct {
	// Name of the company
	Company string
	// Name of the role in the company
	Role string
	// Duration (in years) in the company
	Duration int
}

type Resume

type Resume struct {
	// Name in the resume
	Name string
	// Experience section in the resume
	Experience []*Experience
	// Education section in the resume
	Education []*Education
}

type Service

type Service interface {
	// List all stored resumes
	List(context.Context) (res StoredResumeCollection, err error)
	// Add n number of resumes and return their IDs. This is a multipart request
	// and each part has field name 'resume' and contains the encoded resume to be
	// added.
	Add(context.Context, []*Resume) (res []int, err error)
}

The storage service makes it possible to add resumes using multipart.

type StoredResume

type StoredResume struct {
	// ID of the resume
	ID int
	// Time when resume was created
	CreatedAt string
	// Name in the resume
	Name string
	// Experience section in the resume
	Experience []*Experience
	// Education section in the resume
	Education []*Education
}

type StoredResumeCollection

type StoredResumeCollection []*StoredResume

StoredResumeCollection is the result type of the resume service list method.

func NewStoredResumeCollection

func NewStoredResumeCollection(vres resumeviews.StoredResumeCollection) StoredResumeCollection

NewStoredResumeCollection initializes result type StoredResumeCollection from viewed result type StoredResumeCollection.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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