2020-10-09 13:18:53 -04:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package services
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
2021-02-22 12:46:00 -05:00
// Requires gRPC-Go v1.32.0 or later.
2020-11-11 14:41:05 -05:00
const _ = grpc . SupportPackageIsVersion7
2020-10-09 13:18:53 -04:00
// HostServiceClient is the client API for HostService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type HostServiceClient interface {
// GetHost returns a stored Host if present. The provided request
// must include the host ID for the resource being retrieved. If the ID is
// missing, malformed or referencing anon existing resource an error is
// returned.
GetHost ( ctx context . Context , in * GetHostRequest , opts ... grpc . CallOption ) ( * GetHostResponse , error )
// ListHosts returns a list of stored hosts which exist inside the provided
// Host Catalog. The request must include the Host Catalog id containing the
// Hosts being listed. If the id is missing, malformed, or reference a
// non-existing resource, an error is returned.
ListHosts ( ctx context . Context , in * ListHostsRequest , opts ... grpc . CallOption ) ( * ListHostsResponse , error )
// CreateHost creates and stores a Host in boundary. The provided
// request must include the Host Catalog id in which the Host
// will be created. If the Catalog id is missing, malformed or references a
// non-existing resource, an error is returned. If a name is provided that
// is in use by another Host in the same Host Catalog, an error is returned.
CreateHost ( ctx context . Context , in * CreateHostRequest , opts ... grpc . CallOption ) ( * CreateHostResponse , error )
// UpdateHost updates an existing Host in boundary. The provided
// Host must not have any read only fields set. The update mask must be
// included in the request and contain at least 1 mutable field. To unset
// a field's value, include the field in the update mask and don't set it
// in the provided Host. An error is returned if the Host id is missing or
// reference a non-existing resource. An error is also returned if the
// request attempts to update the name to one that is already in use in
// the same Host Catalog.
UpdateHost ( ctx context . Context , in * UpdateHostRequest , opts ... grpc . CallOption ) ( * UpdateHostResponse , error )
// DeleteHost removes a Host from Boundary. If the provided Host ID
// is malformed or not provided an error is returned.
DeleteHost ( ctx context . Context , in * DeleteHostRequest , opts ... grpc . CallOption ) ( * DeleteHostResponse , error )
}
type hostServiceClient struct {
cc grpc . ClientConnInterface
}
func NewHostServiceClient ( cc grpc . ClientConnInterface ) HostServiceClient {
return & hostServiceClient { cc }
}
func ( c * hostServiceClient ) GetHost ( ctx context . Context , in * GetHostRequest , opts ... grpc . CallOption ) ( * GetHostResponse , error ) {
out := new ( GetHostResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.HostService/GetHost" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * hostServiceClient ) ListHosts ( ctx context . Context , in * ListHostsRequest , opts ... grpc . CallOption ) ( * ListHostsResponse , error ) {
out := new ( ListHostsResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.HostService/ListHosts" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * hostServiceClient ) CreateHost ( ctx context . Context , in * CreateHostRequest , opts ... grpc . CallOption ) ( * CreateHostResponse , error ) {
out := new ( CreateHostResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.HostService/CreateHost" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * hostServiceClient ) UpdateHost ( ctx context . Context , in * UpdateHostRequest , opts ... grpc . CallOption ) ( * UpdateHostResponse , error ) {
out := new ( UpdateHostResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.HostService/UpdateHost" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * hostServiceClient ) DeleteHost ( ctx context . Context , in * DeleteHostRequest , opts ... grpc . CallOption ) ( * DeleteHostResponse , error ) {
out := new ( DeleteHostResponse )
err := c . cc . Invoke ( ctx , "/controller.api.services.v1.HostService/DeleteHost" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// HostServiceServer is the server API for HostService service.
2020-11-11 14:41:05 -05:00
// All implementations must embed UnimplementedHostServiceServer
// for forward compatibility
2020-10-09 13:18:53 -04:00
type HostServiceServer interface {
// GetHost returns a stored Host if present. The provided request
// must include the host ID for the resource being retrieved. If the ID is
// missing, malformed or referencing anon existing resource an error is
// returned.
GetHost ( context . Context , * GetHostRequest ) ( * GetHostResponse , error )
// ListHosts returns a list of stored hosts which exist inside the provided
// Host Catalog. The request must include the Host Catalog id containing the
// Hosts being listed. If the id is missing, malformed, or reference a
// non-existing resource, an error is returned.
ListHosts ( context . Context , * ListHostsRequest ) ( * ListHostsResponse , error )
// CreateHost creates and stores a Host in boundary. The provided
// request must include the Host Catalog id in which the Host
// will be created. If the Catalog id is missing, malformed or references a
// non-existing resource, an error is returned. If a name is provided that
// is in use by another Host in the same Host Catalog, an error is returned.
CreateHost ( context . Context , * CreateHostRequest ) ( * CreateHostResponse , error )
// UpdateHost updates an existing Host in boundary. The provided
// Host must not have any read only fields set. The update mask must be
// included in the request and contain at least 1 mutable field. To unset
// a field's value, include the field in the update mask and don't set it
// in the provided Host. An error is returned if the Host id is missing or
// reference a non-existing resource. An error is also returned if the
// request attempts to update the name to one that is already in use in
// the same Host Catalog.
UpdateHost ( context . Context , * UpdateHostRequest ) ( * UpdateHostResponse , error )
// DeleteHost removes a Host from Boundary. If the provided Host ID
// is malformed or not provided an error is returned.
DeleteHost ( context . Context , * DeleteHostRequest ) ( * DeleteHostResponse , error )
2020-11-11 14:41:05 -05:00
mustEmbedUnimplementedHostServiceServer ()
2020-10-09 13:18:53 -04:00
}
2020-11-11 14:41:05 -05:00
// UnimplementedHostServiceServer must be embedded to have forward compatible implementations.
2021-01-08 10:32:02 -05:00
type UnimplementedHostServiceServer struct {
}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
func ( UnimplementedHostServiceServer ) GetHost ( context . Context , * GetHostRequest ) ( * GetHostResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method GetHost not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedHostServiceServer ) ListHosts ( context . Context , * ListHostsRequest ) ( * ListHostsResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method ListHosts not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedHostServiceServer ) CreateHost ( context . Context , * CreateHostRequest ) ( * CreateHostResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method CreateHost not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedHostServiceServer ) UpdateHost ( context . Context , * UpdateHostRequest ) ( * UpdateHostResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method UpdateHost not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedHostServiceServer ) DeleteHost ( context . Context , * DeleteHostRequest ) ( * DeleteHostResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method DeleteHost not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedHostServiceServer ) mustEmbedUnimplementedHostServiceServer () {}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
// UnsafeHostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HostServiceServer will
// result in compilation errors.
type UnsafeHostServiceServer interface {
mustEmbedUnimplementedHostServiceServer ()
}
func RegisterHostServiceServer ( s grpc . ServiceRegistrar , srv HostServiceServer ) {
2021-02-22 12:46:00 -05:00
s . RegisterService ( & HostService_ServiceDesc , srv )
2020-10-09 13:18:53 -04:00
}
func _HostService_GetHost_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( GetHostRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( HostServiceServer ). GetHost ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.HostService/GetHost" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( HostServiceServer ). GetHost ( ctx , req .( * GetHostRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _HostService_ListHosts_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( ListHostsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( HostServiceServer ). ListHosts ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.HostService/ListHosts" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( HostServiceServer ). ListHosts ( ctx , req .( * ListHostsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _HostService_CreateHost_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( CreateHostRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( HostServiceServer ). CreateHost ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.HostService/CreateHost" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( HostServiceServer ). CreateHost ( ctx , req .( * CreateHostRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _HostService_UpdateHost_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( UpdateHostRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( HostServiceServer ). UpdateHost ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.HostService/UpdateHost" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( HostServiceServer ). UpdateHost ( ctx , req .( * UpdateHostRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _HostService_DeleteHost_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( DeleteHostRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( HostServiceServer ). DeleteHost ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/controller.api.services.v1.HostService/DeleteHost" ,
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( HostServiceServer ). DeleteHost ( ctx , req .( * DeleteHostRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2021-02-22 12:46:00 -05:00
// HostService_ServiceDesc is the grpc.ServiceDesc for HostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HostService_ServiceDesc = grpc . ServiceDesc {
2020-10-09 13:18:53 -04:00
ServiceName : "controller.api.services.v1.HostService" ,
HandlerType : ( * HostServiceServer )( nil ),
Methods : [] grpc . MethodDesc {
{
MethodName : "GetHost" ,
Handler : _HostService_GetHost_Handler ,
},
{
MethodName : "ListHosts" ,
Handler : _HostService_ListHosts_Handler ,
},
{
MethodName : "CreateHost" ,
Handler : _HostService_CreateHost_Handler ,
},
{
MethodName : "UpdateHost" ,
Handler : _HostService_UpdateHost_Handler ,
},
{
MethodName : "DeleteHost" ,
Handler : _HostService_DeleteHost_Handler ,
},
},
Streams : [] grpc . StreamDesc {},
Metadata : "controller/api/services/v1/host_service.proto" ,
}