github.com/emcfarlane/larking@v0.0.0-20220605172417-1704b45ee6c3/control/insecure.go (about)

     1  // Copyright 2022 Edward McFarlane. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package control
     6  
     7  import (
     8  	"context"
     9  
    10  	"github.com/emcfarlane/larking/apipb/controlpb"
    11  	status "google.golang.org/genproto/googleapis/rpc/status"
    12  	"google.golang.org/grpc"
    13  )
    14  
    15  type InsecureControlClient struct{}
    16  
    17  func (InsecureControlClient) Check(
    18  	ctx context.Context, in *controlpb.CheckRequest, opts ...grpc.CallOption,
    19  ) (*controlpb.CheckResponse, error) {
    20  	return &controlpb.CheckResponse{
    21  		Status: &status.Status{
    22  			Code:    0, // okay
    23  			Message: "insecure check",
    24  		},
    25  	}, nil
    26  }