mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Integrate public as bindata optionally (#293)
* Dropped unused codekit config * Integrated dynamic and static bindata for public * Ignore public bindata * Add a general generate make task * Integrated flexible public assets into web command * Updated vendoring, added all missiong govendor deps * Made the linter happy with the bindata and dynamic code * Moved public bindata definition to modules directory * Ignoring the new bindata path now * Updated to the new public modules import path * Updated public bindata command and drop the new prefix
This commit is contained in:
		
				
					committed by
					
						 Lunny Xiao
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							4680c349dd
						
					
				
				
					commit
					b6a95a8cb3
				
			
							
								
								
									
										67
									
								
								vendor/github.com/pingcap/go-hbase/client_ops.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								vendor/github.com/pingcap/go-hbase/client_ops.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | ||||
| package hbase | ||||
|  | ||||
| import ( | ||||
| 	"github.com/juju/errors" | ||||
| 	"github.com/pingcap/go-hbase/proto" | ||||
| ) | ||||
|  | ||||
| func (c *client) Delete(table string, del *Delete) (bool, error) { | ||||
| 	response, err := c.do([]byte(table), del.GetRow(), del, true) | ||||
| 	if err != nil { | ||||
| 		return false, errors.Trace(err) | ||||
| 	} | ||||
|  | ||||
| 	switch r := response.(type) { | ||||
| 	case *proto.MutateResponse: | ||||
| 		return r.GetProcessed(), nil | ||||
| 	} | ||||
| 	return false, errors.Errorf("Invalid response seen [response: %#v]", response) | ||||
| } | ||||
|  | ||||
| func (c *client) Get(table string, get *Get) (*ResultRow, error) { | ||||
| 	response, err := c.do([]byte(table), get.GetRow(), get, true) | ||||
| 	if err != nil { | ||||
| 		return nil, errors.Trace(err) | ||||
| 	} | ||||
|  | ||||
| 	switch r := response.(type) { | ||||
| 	case *proto.GetResponse: | ||||
| 		res := r.GetResult() | ||||
| 		if res == nil { | ||||
| 			return nil, errors.Errorf("Empty response: [table=%s] [row=%q]", table, get.GetRow()) | ||||
| 		} | ||||
|  | ||||
| 		return NewResultRow(res), nil | ||||
| 	case *exception: | ||||
| 		return nil, errors.New(r.msg) | ||||
| 	} | ||||
| 	return nil, errors.Errorf("Invalid response seen [response: %#v]", response) | ||||
| } | ||||
|  | ||||
| func (c *client) Put(table string, put *Put) (bool, error) { | ||||
| 	response, err := c.do([]byte(table), put.GetRow(), put, true) | ||||
| 	if err != nil { | ||||
| 		return false, errors.Trace(err) | ||||
| 	} | ||||
|  | ||||
| 	switch r := response.(type) { | ||||
| 	case *proto.MutateResponse: | ||||
| 		return r.GetProcessed(), nil | ||||
| 	} | ||||
| 	return false, errors.Errorf("Invalid response seen [response: %#v]", response) | ||||
| } | ||||
|  | ||||
| func (c *client) ServiceCall(table string, call *CoprocessorServiceCall) (*proto.CoprocessorServiceResponse, error) { | ||||
| 	response, err := c.do([]byte(table), call.Row, call, true) | ||||
| 	if err != nil { | ||||
| 		return nil, errors.Trace(err) | ||||
| 	} | ||||
|  | ||||
| 	switch r := response.(type) { | ||||
| 	case *proto.CoprocessorServiceResponse: | ||||
| 		return r, nil | ||||
| 	case *exception: | ||||
| 		return nil, errors.New(r.msg) | ||||
| 	} | ||||
| 	return nil, errors.Errorf("Invalid response seen [response: %#v]", response) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user