common

package
v0.0.0-...-62af338 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type College

type College struct {
	// contains filtered or unexported fields
}

College struct represents a college.

func NewCollege

func NewCollege() *College

NewCollege function returns a new instance of College (pointer).

func (*College) Add

func (c *College) Add(payload Student, reply *Student) error

Add methods adds a student to the college (procedure).

func (*College) Get

func (c *College) Get(payload int, reply *Student) error

Get methods returns a student with specific id (procedure).

type Student

type Student struct {
	ID                  int
	FirstName, LastName string
}

Student struct represents a student.

func (Student) FullName

func (s Student) FullName() string

FullName returns the fullname of the student.

Jump to

Keyboard shortcuts

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