camping

package
v0.0.0-...-d9b7cdc Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package camping is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCampingServiceHandler

func RegisterCampingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCampingServiceHandler registers the http handlers for service CampingService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCampingServiceHandlerClient

func RegisterCampingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CampingServiceClient) error

RegisterCampingServiceHandlerClient registers the http handlers for service CampingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CampingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CampingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CampingServiceClient" to call the correct interceptors.

func RegisterCampingServiceHandlerFromEndpoint

func RegisterCampingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCampingServiceHandlerFromEndpoint is same as RegisterCampingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCampingServiceServer

func RegisterCampingServiceServer(s *grpc.Server, srv CampingServiceServer)

Types

type CampingServiceClient

type CampingServiceClient interface {
	SitesGet(ctx context.Context, in *SitesGetRequest, opts ...grpc.CallOption) (*SitesGetResponse, error)
	SiteUpsert(ctx context.Context, in *SiteUpsertRequest, opts ...grpc.CallOption) (*SiteUpsertResponse, error)
	NationalForestsGet(ctx context.Context, in *NationalForestsGetRequest, opts ...grpc.CallOption) (*NationalForestsGetResponse, error)
	DistrictsGet(ctx context.Context, in *DistrictsGetRequest, opts ...grpc.CallOption) (*DistrictsGetResponse, error)
}

CampingServiceClient is the client API for CampingService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCampingServiceClient

func NewCampingServiceClient(cc *grpc.ClientConn) CampingServiceClient

type CampingServiceServer

CampingServiceServer is the server API for CampingService service.

type District

type District struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	NationalForestId     uint64   `protobuf:"varint,2,opt,name=national_forest_id,json=nationalForestId,proto3" json:"national_forest_id,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	MapLocation          string   `protobuf:"bytes,4,opt,name=map_location,json=mapLocation,proto3" json:"map_location,omitempty"`
	CreatedAt            string   `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*District) Descriptor

func (*District) Descriptor() ([]byte, []int)

func (*District) GetCreatedAt

func (m *District) GetCreatedAt() string

func (*District) GetId

func (m *District) GetId() uint64

func (*District) GetMapLocation

func (m *District) GetMapLocation() string

func (*District) GetName

func (m *District) GetName() string

func (*District) GetNationalForestId

func (m *District) GetNationalForestId() uint64

func (*District) ProtoMessage

func (*District) ProtoMessage()

func (*District) Reset

func (m *District) Reset()

func (*District) String

func (m *District) String() string

func (*District) XXX_DiscardUnknown

func (m *District) XXX_DiscardUnknown()

func (*District) XXX_Marshal

func (m *District) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*District) XXX_Merge

func (m *District) XXX_Merge(src proto.Message)

func (*District) XXX_Size

func (m *District) XXX_Size() int

func (*District) XXX_Unmarshal

func (m *District) XXX_Unmarshal(b []byte) error

type DistrictsGetRequest

type DistrictsGetRequest struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DistrictsGetRequest) Descriptor

func (*DistrictsGetRequest) Descriptor() ([]byte, []int)

func (*DistrictsGetRequest) GetId

func (m *DistrictsGetRequest) GetId() uint64

func (*DistrictsGetRequest) ProtoMessage

func (*DistrictsGetRequest) ProtoMessage()

func (*DistrictsGetRequest) Reset

func (m *DistrictsGetRequest) Reset()

func (*DistrictsGetRequest) String

func (m *DistrictsGetRequest) String() string

func (*DistrictsGetRequest) XXX_DiscardUnknown

func (m *DistrictsGetRequest) XXX_DiscardUnknown()

func (*DistrictsGetRequest) XXX_Marshal

func (m *DistrictsGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DistrictsGetRequest) XXX_Merge

func (m *DistrictsGetRequest) XXX_Merge(src proto.Message)

func (*DistrictsGetRequest) XXX_Size

func (m *DistrictsGetRequest) XXX_Size() int

func (*DistrictsGetRequest) XXX_Unmarshal

func (m *DistrictsGetRequest) XXX_Unmarshal(b []byte) error

type DistrictsGetResponse

type DistrictsGetResponse struct {
	Districts            []*District `protobuf:"bytes,1,rep,name=districts,proto3" json:"districts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*DistrictsGetResponse) Descriptor

func (*DistrictsGetResponse) Descriptor() ([]byte, []int)

func (*DistrictsGetResponse) GetDistricts

func (m *DistrictsGetResponse) GetDistricts() []*District

func (*DistrictsGetResponse) ProtoMessage

func (*DistrictsGetResponse) ProtoMessage()

func (*DistrictsGetResponse) Reset

func (m *DistrictsGetResponse) Reset()

func (*DistrictsGetResponse) String

func (m *DistrictsGetResponse) String() string

func (*DistrictsGetResponse) XXX_DiscardUnknown

func (m *DistrictsGetResponse) XXX_DiscardUnknown()

func (*DistrictsGetResponse) XXX_Marshal

func (m *DistrictsGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DistrictsGetResponse) XXX_Merge

func (m *DistrictsGetResponse) XXX_Merge(src proto.Message)

func (*DistrictsGetResponse) XXX_Size

func (m *DistrictsGetResponse) XXX_Size() int

func (*DistrictsGetResponse) XXX_Unmarshal

func (m *DistrictsGetResponse) XXX_Unmarshal(b []byte) error

type NationalForest

type NationalForest struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Website              string   `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"`
	CreatedAt            string   `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NationalForest) Descriptor

func (*NationalForest) Descriptor() ([]byte, []int)

func (*NationalForest) GetCreatedAt

func (m *NationalForest) GetCreatedAt() string

func (*NationalForest) GetId

func (m *NationalForest) GetId() uint64

func (*NationalForest) GetName

func (m *NationalForest) GetName() string

func (*NationalForest) GetWebsite

func (m *NationalForest) GetWebsite() string

func (*NationalForest) ProtoMessage

func (*NationalForest) ProtoMessage()

func (*NationalForest) Reset

func (m *NationalForest) Reset()

func (*NationalForest) String

func (m *NationalForest) String() string

func (*NationalForest) XXX_DiscardUnknown

func (m *NationalForest) XXX_DiscardUnknown()

func (*NationalForest) XXX_Marshal

func (m *NationalForest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NationalForest) XXX_Merge

func (m *NationalForest) XXX_Merge(src proto.Message)

func (*NationalForest) XXX_Size

func (m *NationalForest) XXX_Size() int

func (*NationalForest) XXX_Unmarshal

func (m *NationalForest) XXX_Unmarshal(b []byte) error

type NationalForestsGetRequest

type NationalForestsGetRequest struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NationalForestsGetRequest) Descriptor

func (*NationalForestsGetRequest) Descriptor() ([]byte, []int)

func (*NationalForestsGetRequest) GetId

func (m *NationalForestsGetRequest) GetId() uint64

func (*NationalForestsGetRequest) ProtoMessage

func (*NationalForestsGetRequest) ProtoMessage()

func (*NationalForestsGetRequest) Reset

func (m *NationalForestsGetRequest) Reset()

func (*NationalForestsGetRequest) String

func (m *NationalForestsGetRequest) String() string

func (*NationalForestsGetRequest) XXX_DiscardUnknown

func (m *NationalForestsGetRequest) XXX_DiscardUnknown()

func (*NationalForestsGetRequest) XXX_Marshal

func (m *NationalForestsGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NationalForestsGetRequest) XXX_Merge

func (m *NationalForestsGetRequest) XXX_Merge(src proto.Message)

func (*NationalForestsGetRequest) XXX_Size

func (m *NationalForestsGetRequest) XXX_Size() int

func (*NationalForestsGetRequest) XXX_Unmarshal

func (m *NationalForestsGetRequest) XXX_Unmarshal(b []byte) error

type NationalForestsGetResponse

type NationalForestsGetResponse struct {
	Forests              []*NationalForest `protobuf:"bytes,1,rep,name=forests,proto3" json:"forests,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*NationalForestsGetResponse) Descriptor

func (*NationalForestsGetResponse) Descriptor() ([]byte, []int)

func (*NationalForestsGetResponse) GetForests

func (m *NationalForestsGetResponse) GetForests() []*NationalForest

func (*NationalForestsGetResponse) ProtoMessage

func (*NationalForestsGetResponse) ProtoMessage()

func (*NationalForestsGetResponse) Reset

func (m *NationalForestsGetResponse) Reset()

func (*NationalForestsGetResponse) String

func (m *NationalForestsGetResponse) String() string

func (*NationalForestsGetResponse) XXX_DiscardUnknown

func (m *NationalForestsGetResponse) XXX_DiscardUnknown()

func (*NationalForestsGetResponse) XXX_Marshal

func (m *NationalForestsGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NationalForestsGetResponse) XXX_Merge

func (m *NationalForestsGetResponse) XXX_Merge(src proto.Message)

func (*NationalForestsGetResponse) XXX_Size

func (m *NationalForestsGetResponse) XXX_Size() int

func (*NationalForestsGetResponse) XXX_Unmarshal

func (m *NationalForestsGetResponse) XXX_Unmarshal(b []byte) error

type Site

type Site struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Latitude             float32  `protobuf:"fixed32,2,opt,name=latitude,proto3" json:"latitude,omitempty"`
	Longitude            float32  `protobuf:"fixed32,3,opt,name=longitude,proto3" json:"longitude,omitempty"`
	NationalForestId     uint64   `protobuf:"varint,4,opt,name=national_forest_id,json=nationalForestId,proto3" json:"national_forest_id,omitempty"`
	DistrictId           uint64   `protobuf:"varint,5,opt,name=district_id,json=districtId,proto3" json:"district_id,omitempty"`
	Altitude             uint64   `protobuf:"varint,6,opt,name=altitude,proto3" json:"altitude,omitempty"`
	Notes                string   `protobuf:"bytes,7,opt,name=notes,proto3" json:"notes,omitempty"`
	CreatedAt            string   `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Site) Descriptor

func (*Site) Descriptor() ([]byte, []int)

func (*Site) GetAltitude

func (m *Site) GetAltitude() uint64

func (*Site) GetCreatedAt

func (m *Site) GetCreatedAt() string

func (*Site) GetDistrictId

func (m *Site) GetDistrictId() uint64

func (*Site) GetId

func (m *Site) GetId() uint64

func (*Site) GetLatitude

func (m *Site) GetLatitude() float32

func (*Site) GetLongitude

func (m *Site) GetLongitude() float32

func (*Site) GetNationalForestId

func (m *Site) GetNationalForestId() uint64

func (*Site) GetNotes

func (m *Site) GetNotes() string

func (*Site) ProtoMessage

func (*Site) ProtoMessage()

func (*Site) Reset

func (m *Site) Reset()

func (*Site) String

func (m *Site) String() string

func (*Site) XXX_DiscardUnknown

func (m *Site) XXX_DiscardUnknown()

func (*Site) XXX_Marshal

func (m *Site) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Site) XXX_Merge

func (m *Site) XXX_Merge(src proto.Message)

func (*Site) XXX_Size

func (m *Site) XXX_Size() int

func (*Site) XXX_Unmarshal

func (m *Site) XXX_Unmarshal(b []byte) error

type SiteUpsertRequest

type SiteUpsertRequest struct {
	Latitude             float32  `protobuf:"fixed32,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
	Longitude            float32  `protobuf:"fixed32,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
	NationalForestId     uint64   `protobuf:"varint,3,opt,name=national_forest_id,json=nationalForestId,proto3" json:"national_forest_id,omitempty"`
	DistrictId           uint64   `protobuf:"varint,4,opt,name=district_id,json=districtId,proto3" json:"district_id,omitempty"`
	Altitude             uint64   `protobuf:"varint,5,opt,name=altitude,proto3" json:"altitude,omitempty"`
	Notes                string   `protobuf:"bytes,6,opt,name=notes,proto3" json:"notes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SiteUpsertRequest) Descriptor

func (*SiteUpsertRequest) Descriptor() ([]byte, []int)

func (*SiteUpsertRequest) GetAltitude

func (m *SiteUpsertRequest) GetAltitude() uint64

func (*SiteUpsertRequest) GetDistrictId

func (m *SiteUpsertRequest) GetDistrictId() uint64

func (*SiteUpsertRequest) GetLatitude

func (m *SiteUpsertRequest) GetLatitude() float32

func (*SiteUpsertRequest) GetLongitude

func (m *SiteUpsertRequest) GetLongitude() float32

func (*SiteUpsertRequest) GetNationalForestId

func (m *SiteUpsertRequest) GetNationalForestId() uint64

func (*SiteUpsertRequest) GetNotes

func (m *SiteUpsertRequest) GetNotes() string

func (*SiteUpsertRequest) ProtoMessage

func (*SiteUpsertRequest) ProtoMessage()

func (*SiteUpsertRequest) Reset

func (m *SiteUpsertRequest) Reset()

func (*SiteUpsertRequest) String

func (m *SiteUpsertRequest) String() string

func (*SiteUpsertRequest) XXX_DiscardUnknown

func (m *SiteUpsertRequest) XXX_DiscardUnknown()

func (*SiteUpsertRequest) XXX_Marshal

func (m *SiteUpsertRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SiteUpsertRequest) XXX_Merge

func (m *SiteUpsertRequest) XXX_Merge(src proto.Message)

func (*SiteUpsertRequest) XXX_Size

func (m *SiteUpsertRequest) XXX_Size() int

func (*SiteUpsertRequest) XXX_Unmarshal

func (m *SiteUpsertRequest) XXX_Unmarshal(b []byte) error

type SiteUpsertResponse

type SiteUpsertResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SiteUpsertResponse) Descriptor

func (*SiteUpsertResponse) Descriptor() ([]byte, []int)

func (*SiteUpsertResponse) ProtoMessage

func (*SiteUpsertResponse) ProtoMessage()

func (*SiteUpsertResponse) Reset

func (m *SiteUpsertResponse) Reset()

func (*SiteUpsertResponse) String

func (m *SiteUpsertResponse) String() string

func (*SiteUpsertResponse) XXX_DiscardUnknown

func (m *SiteUpsertResponse) XXX_DiscardUnknown()

func (*SiteUpsertResponse) XXX_Marshal

func (m *SiteUpsertResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SiteUpsertResponse) XXX_Merge

func (m *SiteUpsertResponse) XXX_Merge(src proto.Message)

func (*SiteUpsertResponse) XXX_Size

func (m *SiteUpsertResponse) XXX_Size() int

func (*SiteUpsertResponse) XXX_Unmarshal

func (m *SiteUpsertResponse) XXX_Unmarshal(b []byte) error

type SitesGetRequest

type SitesGetRequest struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SitesGetRequest) Descriptor

func (*SitesGetRequest) Descriptor() ([]byte, []int)

func (*SitesGetRequest) GetId

func (m *SitesGetRequest) GetId() uint64

func (*SitesGetRequest) ProtoMessage

func (*SitesGetRequest) ProtoMessage()

func (*SitesGetRequest) Reset

func (m *SitesGetRequest) Reset()

func (*SitesGetRequest) String

func (m *SitesGetRequest) String() string

func (*SitesGetRequest) XXX_DiscardUnknown

func (m *SitesGetRequest) XXX_DiscardUnknown()

func (*SitesGetRequest) XXX_Marshal

func (m *SitesGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SitesGetRequest) XXX_Merge

func (m *SitesGetRequest) XXX_Merge(src proto.Message)

func (*SitesGetRequest) XXX_Size

func (m *SitesGetRequest) XXX_Size() int

func (*SitesGetRequest) XXX_Unmarshal

func (m *SitesGetRequest) XXX_Unmarshal(b []byte) error

type SitesGetResponse

type SitesGetResponse struct {
	Sites                []*Site  `protobuf:"bytes,1,rep,name=sites,proto3" json:"sites,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SitesGetResponse) Descriptor

func (*SitesGetResponse) Descriptor() ([]byte, []int)

func (*SitesGetResponse) GetSites

func (m *SitesGetResponse) GetSites() []*Site

func (*SitesGetResponse) ProtoMessage

func (*SitesGetResponse) ProtoMessage()

func (*SitesGetResponse) Reset

func (m *SitesGetResponse) Reset()

func (*SitesGetResponse) String

func (m *SitesGetResponse) String() string

func (*SitesGetResponse) XXX_DiscardUnknown

func (m *SitesGetResponse) XXX_DiscardUnknown()

func (*SitesGetResponse) XXX_Marshal

func (m *SitesGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SitesGetResponse) XXX_Merge

func (m *SitesGetResponse) XXX_Merge(src proto.Message)

func (*SitesGetResponse) XXX_Size

func (m *SitesGetResponse) XXX_Size() int

func (*SitesGetResponse) XXX_Unmarshal

func (m *SitesGetResponse) XXX_Unmarshal(b []byte) error

type UnimplementedCampingServiceServer

type UnimplementedCampingServiceServer struct {
}

UnimplementedCampingServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCampingServiceServer) DistrictsGet

func (*UnimplementedCampingServiceServer) NationalForestsGet

func (*UnimplementedCampingServiceServer) SiteUpsert

func (*UnimplementedCampingServiceServer) SitesGet

Jump to

Keyboard shortcuts

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