code: func (n *NetworkServerAPI) GetGatewayProfile(ctx context.Context, req *ns.GetGatewayProfileRequest) (*ns.GetGatewayProfileResponse, error) {
  	var gpID uuid.UUID
  	copy(gpID[:], req.Id)
  
  	gc, err := storage.GetGatewayProfile(storage.DB(), gpID)
  	if err != nil {
  		return nil, errToRPCError(err)
  	}
  
  	out := ns.GetGatewayProfileResponse{
  		GatewayProfile: &ns.GatewayProfile{
  			Id: gc.ID.Bytes(),
  		},
  	}
  
  	out.CreatedAt, err = ptypes.TimestampProto(gc.CreatedAt)
  	if err != nil {
  		return nil, errToRPCError(err)
  	}
  
  	out.UpdatedAt, err = ptypes.TimestampProto(gc.UpdatedAt)
  	if err != nil {
  		return nil, errToRPCError(err)
  	}
  
  	for _, c := range gc.Channels {
  		out.GatewayProfile.Channels = append(out.GatewayProfile.Channels, uint32(c))
  	}
  
  	for _, ec := range gc.ExtraChannels {
  		c := ns.GatewayProfileExtraChannel{
  			Frequency: uint32(ec.Frequency),
  			Bandwidth: uint32(ec.Bandwidth),
  			Bitrate:   uint32(ec.Bitrate),
  		}
  
  		switch ec.Modulation {
  		case storage.ModulationFSK:
  			c.Modulation = common.Modulation_FSK
  		default:
  			c.Modulation = common.Modulation_LORA
  		}
  
  		for _, sf := range ec.SpreadingFactors {
  			c.SpreadingFactors = append(c.SpreadingFactors, uint32(sf))
  		}
  
  		out.GatewayProfile.ExtraChannels = append(out.GatewayProfile.ExtraChannels, &c)
  	}
  
  	return &out, nil
  }
docs: // GetGatewayProfile returns the gateway-profile given an id.