Which column type for "direction"?
You can create an enumerated type for this:

CREATE TYPE direction AS ENUM ('in', 'out');

CREATE TABLE a_table (
  ID        serial,
  direction direction NOT NULL
);

INSERT INTO a_table (direction) VALUES ('in');        -- succeeds
INSERT INTO a_table (direction) VALUES ('sideways');  -- fails